Skip to content

Commit

Permalink
use ChangeExtension for robustness
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardmiller-mesirow committed May 21, 2024
1 parent 88a3aac commit b6034c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Public/ConvertTo-ExcelXlsx.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function ConvertTo-ExcelXlsx {

$xlFixedFormat = 51 #Constant for XLSX Workbook
$xlsFile = Get-Item -Path $singlePath
$xlsxPath = "{0}x" -f $xlsFile.FullName
$xlsxPath = [System.IO.Path]::ChangeExtension($xlsFile.FullName, ".xlsx")

if ($xlsFile.Extension -ne ".xls") {
throw "Expected .xls extension"
Expand Down

0 comments on commit b6034c3

Please sign in to comment.