mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
Trap set row and column on empty shet
This commit is contained in:
@@ -131,6 +131,7 @@
|
||||
$endRow = $Worksheet.Dimension.End.Row
|
||||
}
|
||||
process {
|
||||
if ($null -eq $workSheet.Dimension) {Write-Warning "Can't format an empty worksheet."; return}
|
||||
if ($Column -eq 0 ) {$Column = $endColumn + 1 }
|
||||
$columnName = [OfficeOpenXml.ExcelCellAddress]::new(1,$column).Address -replace "1",""
|
||||
Write-Verbose -Message "Updating Column $columnName"
|
||||
|
||||
Reference in New Issue
Block a user