mirror of
https://github.com/dfinke/ImportExcel.git
synced 2026-01-07 11:03:31 +00:00
Better handling of autosize (again)
This commit is contained in:
@@ -512,7 +512,7 @@ Function Merge-MultipleSheets {
|
||||
Add-ConditionalFormatting @condFormattingParams -ConditionValue ("AND(" +(($sameChecks -join ",") -replace '<>"Same"','="Changed"') +")" ) -BackgroundColor $ChangeBackgroundColor
|
||||
}
|
||||
#We've made a bunch of things wider so now is the time to autofit columns. Any hiding has to come AFTER this, because it unhides things
|
||||
if ([environment]::OSVersion.Platform -notlike "win*" -and -not $env:AUTOSIZE) {Write-Warning "Autofit is not available with this OS configuration."}
|
||||
if ($env:NoAutoSize) {Write-Warning "Autofit is not available with this OS configuration."}
|
||||
else {$sheet.Cells.AutoFitColumns()}
|
||||
|
||||
#if we have a key field (we didn't concatenate all fields) use what we built up in $sameChecks to apply conditional formatting to it (Row no will be in column A, Key in Column B)
|
||||
|
||||
Reference in New Issue
Block a user