Add example to set the background color of a cloumn

This commit is contained in:
dfinke
2017-12-21 09:33:14 -05:00
parent c598bbc2a5
commit 458a08dab0

View File

@@ -0,0 +1,9 @@

$p = ps | select Company, Handles | Export-Excel c:\temp\testBackgroundColor.xlsx -ClearSheet -KillExcel -PassThru
$ws = $p.Workbook.WorkSheets[1]
$totalRows = $ws.Dimension.Rows
Set-Format -Address $ws.Cells["B2:B$($totalRows)"] -BackgroundColor LightBlue
Export-Excel -ExcelPackage $p -show