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