refactor: Replace Excel Interop enum with numeric constant in SaveAs
This commit is contained in:
parent
64540f9a0e
commit
e615e043e3
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user