Dec 14 2019 08:58 AM
Unable to Export-CSV & Export-Excel with file $path please help me on this.
Able to export with full path Export-excel "c:\123\test.xlsx"
But
Not able to export with below
$path = c:\123\test.xlsx
Export-excel $path
Could not open Excel Package c:\123\test.xlsx
At C:\Program Files\WindowsPowerShell\Modules\ImportExcel\6.1.0\Export-Excel.ps1:546 char:16
+ catch {throw "Could not open Excel Package $path"}
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Could not open ...123.xlsx:String) [], RuntimeException
+ FullyQualifiedErrorId : Could not open Excel Package c:\123\test.xlsx
Dec 27 2019 03:11 AM
$f = 'D:\Temp\list.csv'
Get-Service | Export-Csv -Path $f