mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-10 13:23:29 +00:00
Made parameter names the same
This commit is contained in:
@@ -4,7 +4,7 @@ ps | where Company | select Company, Name, PM, Handles, *mem* |
|
|||||||
|
|
||||||
Export-Excel .\testExport.xlsx -Show -AutoSize -AutoNameRange `
|
Export-Excel .\testExport.xlsx -Show -AutoSize -AutoNameRange `
|
||||||
-ConditionalFormat $(
|
-ConditionalFormat $(
|
||||||
New-ConditionalFormattingIconSet -Address "C:C" `
|
New-ConditionalFormattingIconSet -Range "C:C" `
|
||||||
-ConditionalFormat ThreeIconSet -IconType Arrows
|
-ConditionalFormat ThreeIconSet -IconType Arrows
|
||||||
|
|
||||||
) -ConditionalText $(
|
) -ConditionalText $(
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ function Export-Excel {
|
|||||||
|
|
||||||
foreach($format in $ConditionalFormat ) {
|
foreach($format in $ConditionalFormat ) {
|
||||||
$target = "Add$($format.Formatter)"
|
$target = "Add$($format.Formatter)"
|
||||||
$rule = ($ws.ConditionalFormatting).$target($format.Address, $format.IconType)
|
$rule = ($ws.ConditionalFormatting).$target($format.Range, $format.IconType)
|
||||||
$rule.Reverse = $format.Reverse
|
$rule.Reverse = $format.Reverse
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
function New-ConditionalFormattingIconSet {
|
function New-ConditionalFormattingIconSet {
|
||||||
param(
|
param(
|
||||||
[Parameter(Mandatory=$true)]
|
[Parameter(Mandatory=$true)]
|
||||||
$Address,
|
$Range,
|
||||||
[ValidateSet("ThreeIconSet","FourIconSet","FiveIconSet")]
|
[ValidateSet("ThreeIconSet","FourIconSet","FiveIconSet")]
|
||||||
$ConditionalFormat,
|
$ConditionalFormat,
|
||||||
[Switch]$Reverse
|
[Switch]$Reverse
|
||||||
@@ -42,7 +42,7 @@ function New-ConditionalFormattingIconSet {
|
|||||||
$bp = @{}+$PSBoundParameters
|
$bp = @{}+$PSBoundParameters
|
||||||
|
|
||||||
$obj = [PSCustomObject]@{
|
$obj = [PSCustomObject]@{
|
||||||
Address = $Address
|
Range = $Range
|
||||||
Formatter = $ConditionalFormat
|
Formatter = $ConditionalFormat
|
||||||
IconType = $bp.IconType
|
IconType = $bp.IconType
|
||||||
Reverse = $Reverse
|
Reverse = $Reverse
|
||||||
|
|||||||
Reference in New Issue
Block a user