mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
Fix reading multiple sheets in the xlsx where row/col count is diff
This commit is contained in:
@@ -134,6 +134,8 @@
|
||||
|
||||
$xlBook = [Ordered]@{}
|
||||
foreach ($sheet in $Worksheet) {
|
||||
$EndRow = 0
|
||||
$EndColumn = 0
|
||||
$targetSheetname = $sheet.Name
|
||||
$xlBook["$targetSheetname"] = @()
|
||||
#region Get rows and columns
|
||||
@@ -233,8 +235,8 @@
|
||||
}
|
||||
catch { throw "Failed importing the Excel workbook '$Path' with worksheet '$WorksheetName': $_"; return }
|
||||
finally {
|
||||
$EndRow = 0
|
||||
$EndColumn = 0
|
||||
# $EndRow = 0
|
||||
# $EndColumn = 0
|
||||
if ($Path) { $stream.close(); $ExcelPackage.Dispose() }
|
||||
|
||||
if ($NotAsDictionary) {
|
||||
|
||||
Reference in New Issue
Block a user