Fix for EndRow and EndColumn Parameters Ignored in Import-Excel #1194

This commit is contained in:
dfinke
2022-06-12 09:53:52 -04:00
parent 8bb3d50052
commit ef35c4fca8
4 changed files with 42 additions and 3 deletions

View File

@@ -134,8 +134,11 @@
$xlBook = [Ordered]@{}
foreach ($sheet in $Worksheet) {
$EndRow = 0
$EndColumn = 0
if ($Worksheet.Count -gt 1 -or $Paths.Count -gt 1) {
$EndRow = 0
$EndColumn = 0
}
$targetSheetname = $sheet.Name
$xlBook["$targetSheetname"] = @()
#region Get rows and columns