I have imported an Excel sheet into PowerShell by using this module:
I want to count the number of columns so I used the below function:
$columns = @(Import-Excel -Path "D:\Qlik\AccessRules\Roster\RosterTest-Jan.xlsx" -StartRow 1 -EndRow 1 -NoHeader)
Now the array has 51 keys I presume. But how do I count it? No matter what I try, all I see is 1.
I tried:
$columns.Count
$columns.PSObject.BaseObject.Count
Nothing works, any ideas please.
Aucun commentaire:
Enregistrer un commentaire