mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
9 lines
428 B
PowerShell
9 lines
428 B
PowerShell
try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
|
|
|
|
# Create example file
|
|
$xlFile = "$PSScriptRoot\ImportColumns.xlsx"
|
|
Get-Process | Export-Excel -Path $xlFile
|
|
# -ImportColumns will also arrange columns
|
|
Import-Excel -Path $xlFile -ImportColumns @(1,3,2) -NoHeader -StartRow 1
|
|
# Get only pm, npm, cpu, id, processname
|
|
Import-Excel -Path $xlFile -ImportColumns @(6,7,12,25,46) | Format-Table -AutoSize |