Forum Discussion
Convert CSV to XLSX via PowerShell not working with Task scheduler
What if you use the excell module and do something like this?
https://blogs.technet.microsoft.com/heyscriptingguy/2015/11/25/introducing-the-powershell-excel-module-2/
$csv = import-csv c:\temp\test.csv
$csv | export-excel c:\temp\test.xlsx
- Rahul UdayabhanuMay 18, 2018Copper Contributor
Hi,
I tried this method for manual script run. its not generating the output in a formatted way.
$slgcsv = "D:\Temp\UnityScript\Logs\FS_UTIL" +".csv" #Location of the source file
#EMC Storage cmd which give CSV output#EMC Storage cmd which give CSV output with Delimiter ","
uemcli -d XXX -u XXX -p XXX /stor/prov/fs show -output csv -filter "Name,Health details,Server,Protocol,Size,Size used,Replication destination" >> $slgcsv
$csv = import-csv D:\Temp\UnityScript\Logs\FS_UTIL.csv
$csv | export-excel D:\Temp\UnityScript\Logs\test.xlsxo/p of storage command is like below:-
Storage system address: X.X.X.X
Storage system port: 443
HTTPS connection
"Name","Health details","Server","Protocol","Size","Size used","Replication destination"
"XXXX","""The component is operating normally. No action is required.""","nas_2","cifs","107374182400 (100.0G)","38179020800 (35.5G)","no"
"XXXX","""The component is operating normally. No action is required.""","nas_4","cifs","107374182400 (100.0G)","57654591488 (53.6G)","no"