mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-14 23:33:18 +00:00
Fix #46
This commit is contained in:
@@ -54,16 +54,12 @@ function Export-Excel {
|
|||||||
$ws = $pkg | Add-WorkSheet -WorkSheetname $WorkSheetname -NoClobber:$NoClobber
|
$ws = $pkg | Add-WorkSheet -WorkSheetname $WorkSheetname -NoClobber:$NoClobber
|
||||||
|
|
||||||
foreach($format in $ConditionalFormat ) {
|
foreach($format in $ConditionalFormat ) {
|
||||||
#$obj = [PSCustomObject]@{
|
|
||||||
# Address = $Address
|
|
||||||
# Formatter = $ConditionalFormat
|
|
||||||
# IconType = $bp.IconType
|
|
||||||
#}
|
|
||||||
|
|
||||||
$target = "Add$($format.Formatter)"
|
$target = "Add$($format.Formatter)"
|
||||||
$rule = ($ws.ConditionalFormatting).$target($format.Address, $format.IconType)
|
$rule = ($ws.ConditionalFormatting).$target($format.Address, $format.IconType)
|
||||||
$rule.Reverse = $format.Reverse
|
$rule.Reverse = $format.Reverse
|
||||||
}
|
}
|
||||||
|
# Force at least one cell value
|
||||||
|
$ws.Cells[1, 1].Value = ""
|
||||||
|
|
||||||
$Row = 1
|
$Row = 1
|
||||||
if($Title) {
|
if($Title) {
|
||||||
|
|||||||
Reference in New Issue
Block a user