You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I import a sheet, and the sheet has been edited (removed a lot of rows, now 30). The count of the rows stays the same as the original (600 lines). The lines are empty and give all sorts of errors.
$Users = Import-XLSX -Path "D:\ImportUsers\Import\ImportUsers.xlsx" -Header LastName, FirstName, DisplayName, UserName, UPN, Groups Write-Host "Number of users: $($Users.Count)" #(shows 600, should be 30)
I've tried to use a check for empty values, but this doesn't help. $Usercount = 0 Foreach ($User in $Users) {If ($User.Username -or ($User.Username -ne "")) {$Usercount++}}
How can I show the correct number of rows. My workarround is to create a new sheet in the workbook, copy all the content I want and delete the old Sheet.
Thanks for the great efford, the module has saved us a lot of manual work and installations of Office on servers :)
The text was updated successfully, but these errors were encountered:
Hi,
If I import a sheet, and the sheet has been edited (removed a lot of rows, now 30). The count of the rows stays the same as the original (600 lines). The lines are empty and give all sorts of errors.
$Users = Import-XLSX -Path "D:\ImportUsers\Import\ImportUsers.xlsx" -Header LastName, FirstName, DisplayName, UserName, UPN, Groups Write-Host "Number of users: $($Users.Count)" #(shows 600, should be 30)
I've tried to use a check for empty values, but this doesn't help.
$Usercount = 0 Foreach ($User in $Users) {If ($User.Username -or ($User.Username -ne "")) {$Usercount++}}
How can I show the correct number of rows. My workarround is to create a new sheet in the workbook, copy all the content I want and delete the old Sheet.
Thanks for the great efford, the module has saved us a lot of manual work and installations of Office on servers :)
The text was updated successfully, but these errors were encountered: