Question about a function

Hello I’m making a script to format some forms and i found this function:

 Function ExcelCSV ($File) { $excelFile = "$stiRapport" + "$filNavn" + ".xlsx" $Excel = New-Object -ComObject Excel.Application $Excel.Visible = $false $Excel.DisplayAlerts = $false $wb = $Excel.Workbooks.Open($excelFile) foreach ($ws in $wb.Worksheets) { $ws.SaveAs("$stiCsv" + "CSV Rapport temp $(get-date -f dd-MM-yyyy)" + ".csv", 6) } $Excel.Quit() } 

My question is about the line

$ws.SaveAs("$stiCsv" + "CSV Rapport temp $(get-date -f dd-MM-yyyy)" + ".csv", 6) 

The 6 at the end, im curious to know what that does, i know that if i remove it just saves the file as .csv and does nothing to convert it.

submitted by /u/inpenetrable
[link] [comments]

Leave a Reply