unhide support in Export-Excel, return range in Set-Row/Column

This commit is contained in:
jhoneill
2018-07-26 15:40:00 +01:00
parent 5082d2120d
commit af13cfa1d0
7 changed files with 57 additions and 29 deletions

View File

@@ -610,7 +610,7 @@ Describe ExportExcel {
$excel = Open-ExcelPackage $path
$sheet = $excel.Workbook.Worksheets["Processes"]
it "Returned the rule when calling Add-ConditionalFormatting -passthur " {
it "Returned the rule when calling Add-ConditionalFormatting -passthru " {
$rule | should not beNullOrEmpty
$rule.getType().fullname | should be "OfficeOpenXml.ConditionalFormatting.ExcelConditionalFormattingTopPercent"
$rule.Style.Font.Strike | should be true
@@ -631,15 +631,15 @@ Describe ExportExcel {
$sheet.Cells['E2'].style.numberformat.format | Should be '#,###'
$sheet.Column(3).style.numberformat.format | Should be '#,###'
$sheet.Column(4).style.numberformat.format | Should be '#,##0.0'
$sheet.ConditionalFormatting.Count | Should be 2
$sheet.ConditionalFormatting.Count | Should be 3
$sheet.ConditionalFormatting[0].type | Should be 'Databar'
$sheet.ConditionalFormatting[0].Color.name | Should be 'ffff0000'
$sheet.ConditionalFormatting[0].Address.Address | Should be 'D2:D1048576'
$sheet.ConditionalFormatting[1].type | Should be 'GreaterThan'
$sheet.ConditionalFormatting[1].Formula | Should be '104857600'
$sheet.ConditionalFormatting[1].Style.Font.Color.Color.Name | Should be 'ffff0000'
$sheet.ConditionalFormatting[2].Style.Font.Strike | Should be $true
$sheet.ConditionalFormatting[2].type | Should be "TopPercent"
$sheet.ConditionalFormatting[1].Style.Font.Strike | Should be $true
$sheet.ConditionalFormatting[1].type | Should be "TopPercent"
$sheet.ConditionalFormatting[2].type | Should be 'GreaterThan'
$sheet.ConditionalFormatting[2].Formula | Should be '104857600'
$sheet.ConditionalFormatting[2].Style.Font.Color.Color.Name | Should be 'ffff0000'
}
it "Froze the panes " {
$sheet.view.Panes.Count | Should be 3