From bb707195af3239e039931545ab25c6bc5fc1df4a Mon Sep 17 00:00:00 2001 From: Doug Finke Date: Tue, 14 Apr 2015 09:36:21 -0400 Subject: [PATCH] Re-added TitleBackgroundColor --- ImportExcel.psm1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ImportExcel.psm1 b/ImportExcel.psm1 index 0479329..0129b98 100644 --- a/ImportExcel.psm1 +++ b/ImportExcel.psm1 @@ -65,7 +65,7 @@ function Export-Excel { [OfficeOpenXml.Style.ExcelFillStyle]$TitleFillPattern="None", [bool]$TitleBold, [int]$TitleSize=22, - #[System.Drawing.Color]$TitleBackgroundColor, + [System.Drawing.Color]$TitleBackgroundColor, #[string]$TitleBackgroundColor, [string[]]$PivotRows, [string[]]$PivotColumns, @@ -102,9 +102,9 @@ function Export-Excel { $ws.Cells[$Row, 1].Style.Font.Size = $TitleSize $ws.Cells[$Row, 1].Style.Font.Bold = $TitleBold $ws.Cells[$Row, 1].Style.Fill.PatternType = $TitleFillPattern - #if($TitleBackgroundColor) { - # $ws.Cells[$Row, 1].Style.Fill.BackgroundColor.SetColor([System.Drawing.Color]::Blue) - #} + if($TitleBackgroundColor) { + $ws.Cells[$Row, 1].Style.Fill.BackgroundColor.SetColor($TitleBackgroundColor) + } $Row = 2 }