Fixed column name handling in merge-multipleWorksheets. More tests

This commit is contained in:
jhoneill
2018-07-14 23:40:50 +01:00
parent 3697d53bdd
commit 7de956b343
11 changed files with 812 additions and 722 deletions

View File

@@ -11,6 +11,7 @@
. $PSScriptRoot\Copy-ExcelWorkSheet.ps1
. $PSScriptRoot\Export-Excel.ps1
. $PSScriptRoot\Export-ExcelSheet.ps1
. $PSScriptRoot\Get-ExcelColumnName.ps1
. $PSScriptRoot\Get-ExcelSheetInfo.ps1
. $PSScriptRoot\Get-ExcelWorkbookInfo.ps1
. $PSScriptRoot\Get-HtmlTable.ps1
@@ -369,7 +370,7 @@ function Import-Excel {
$colHash = @{}
$rowHash = @{}
foreach ($cell in $Worksheet.Cells[$range]) {
if ($cell.Value -ne $null) {$colHash[$cell.Start.Column]=1; $rowHash[$cell.Start.row]=1 }
if ($null -ne $cell.Value ) {$colHash[$cell.Start.Column]=1; $rowHash[$cell.Start.row]=1 }
}
$rows = ( $StartRow..$EndRow ).Where({$rowHash[$_]})
$columns = ($StartColumn..$EndColumn).Where({$colHash[$_]})