mirror of
https://github.com/dfinke/ImportExcel.git
synced 2026-02-28 18:33:21 +00:00
Added new conditional formatting
This commit is contained in:
@@ -1,12 +1,22 @@
|
||||
function New-ConditionalText {
|
||||
param(
|
||||
[Parameter(Mandatory=$true)]
|
||||
#[Parameter(Mandatory=$true)]
|
||||
$Text,
|
||||
[System.Drawing.Color]$ConditionalTextColor="DarkRed",
|
||||
[System.Drawing.Color]$BackgroundColor="LightPink",
|
||||
[String]$Range,
|
||||
[OfficeOpenXml.Style.ExcelFillStyle]$PatternType=[OfficeOpenXml.Style.ExcelFillStyle]::Solid,
|
||||
[ValidateSet("ContainsText","NotContainsText","BeginsWith","EndsWith")]
|
||||
$ConditionalType="ContainsText"
|
||||
[ValidateSet(
|
||||
"ContainsText","NotContainsText","BeginsWith","EndsWith",
|
||||
"Last7Days","LastMonth","LastWeek",
|
||||
"NextMonth","NextWeek",
|
||||
"ThisMonth","ThisWeek",
|
||||
"Today","Tomorrow","Yesterday",
|
||||
"DuplicateValues",
|
||||
"AboveOrEqualAverage","BelowAverage","AboveAverage",
|
||||
"Top", "TopPercent"
|
||||
)]
|
||||
$ConditionalType="ContainsText"
|
||||
)
|
||||
|
||||
$obj = [PSCustomObject]@{
|
||||
@@ -14,6 +24,7 @@ function New-ConditionalText {
|
||||
ConditionalTextColor = $ConditionalTextColor
|
||||
ConditionalType = $ConditionalType
|
||||
PatternType = $PatternType
|
||||
Range = $Range
|
||||
BackgroundColor = $BackgroundColor
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user