"New-ConditionalText -ConditionalType Equal" equals another cell, not the value i assign
Trying to setup conditional formatting for cells, but it aint working. Because some users are working with a Dutch version of Excel, i have to account for the Dutch words for true or false, which are waar (true) and onwaar) false. Since both words contain 'waar' i need it to be exact (equal). If i use the default method, both will hit on the 2nd conditional formatting. But when i use the code below, the 'formulate' in the conditional formatting becomes: ="TRUE" instead of TRUE. I can change this manually, but that removes the automation of this process.
$results | Export-Excel $outFile -TableStyle Light8 -WorksheetName "Overzicht" -ConditionalText $(
New-ConditionalText -ConditionalType Equal TRUE white green
New-ConditionalText -ConditionalType Equal WAAR white green
New-ConditionalText -ConditionalType Equal FALSE white red
New-ConditionalText -ConditionalType Equal ONWAAR white red
)
Just found an old issue from 2016 that has the same issue: https://github.com/dfinke/ImportExcel/issues/134. Workarround doesnt work
$results | Export-Excel $outFile -TableStyle Light8 -WorksheetName "Overzicht" -ConditionalText $(
New-ConditionalText -ConditionalType Equal '"TRUE"' white green
New-ConditionalText -ConditionalType Equal '"WAAR"' white green
New-ConditionalText -ConditionalType Equal '"FALSE"' white red
New-ConditionalText -ConditionalType Equal '"ONWAAR"' white red
)
don't know off the top of my head. that workarond is what i would've suggested.
Same when i use a different sheet to check the values:
$valueSheet = $TRUE, $FALSE
$valueSheet | Export-Excel $outFile -WorksheetName "CFSheet"
$results | Export-Excel $outFile -TableStyle Light8 -WorksheetName "Overzicht" -MoveToStart -ConditionalText $(
New-ConditionalText -ConditionalType Equal CFSheet`!`$A`$1 white green
New-ConditionalText -ConditionalType Equal CFSheet`!`$A`$2 white red
)
It keeps putting quotes arround it:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@dfinke i guess no update on this?
__
I guess that's one way to solve the problem....
@Tuumke has 2 repos and rolls in with toxic comments