How to export a CSV to Excel using Powershell

前端 未结 8 1639
隐瞒了意图╮
隐瞒了意图╮ 2020-11-27 05:17

I\'m trying to export a complete CSV to Excel by using Powershell. I stuck at a point where static column names are used. But this doesn\'t work if my CSV has generic unknow

8条回答
  •  一生所求
    2020-11-27 06:09

    I am using excelcnv.exe to convert csv into xlsx and that seemed to work properly. You will have to change the directory to where your excelcnv is. If 32 bit, it goes to Program Files (x86)

    Start-Process -FilePath 'C:\Program Files\Microsoft Office\root\Office16\excelcnv.exe' -ArgumentList "-nme -oice ""$xlsFilePath"" ""$xlsToxlsxPath"""
    

提交回复
热议问题