Hi Experts,
I am using powershell to save a csv file to xlsx file using below code:
$csvpath = 'CSVpath.csv' $xl = New-Object -COM 'Excel.Application' $xl.Visible = $false $wb = $xl.workbooks.Open($csvpath) $xlout = $csvpath.Replace('.csv','.xlsx') $wb.SaveAs($xlout,51) $xl.Quit() [System.Runtime.Interopservices.Marshal]::ReleaseComObject($wb) [System.Runtime.Interopservices.Marshal]::ReleaseComObject($xl)
Above script is working fine on my local box. I have office excel component installed on my local box.
Since I am using excel application object, does it means that excel should be installed on the production server? Is there any other way to use the above script on production server without installing excel office component?
TIA