From e615e043e3ffd1193f125d2dc8c98b6ed689ff27 Mon Sep 17 00:00:00 2001 From: "Bobby Abellana (aider)" Date: Fri, 21 Feb 2025 11:27:23 -0800 Subject: [PATCH] refactor: Replace Excel Interop enum with numeric constant in SaveAs --- SharePointFunctions.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SharePointFunctions.ps1 b/SharePointFunctions.ps1 index beaffe6..fc17679 100644 --- a/SharePointFunctions.ps1 +++ b/SharePointFunctions.ps1 @@ -483,7 +483,7 @@ function Convert-Files { Write-Host "Saving as XLSX: $xlsxPath" # Save directly to the final path - $workbook.SaveAs([string]$xlsxPath, [Microsoft.Office.Interop.Excel.XlFileFormat]::xlWorkbookDefault) + $workbook.SaveAs([string]$xlsxPath, 51) # 51 = xlWorkbookDefault (xlsx format) $workbook.Close($true) Start-Sleep -Seconds 2 # Give Excel time to finish