refactor: Replace Excel Interop enum with numeric constant in SaveAs

This commit is contained in:
Bobby Abellana (aider) 2025-02-21 11:27:23 -08:00
parent 64540f9a0e
commit e615e043e3

View File

@ -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