Files
ImportExcel/Examples/ConditionalFormatting/Highlight-ThisWeek.ps1
2020-07-01 22:04:37 +02:00

12 lines
420 B
PowerShell

try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
.\GenDates.ps1 |
Export-Excel $xlSourcefile -Show -AutoSize -ConditionalText $(
New-ConditionalText -ConditionalType ThisWeek
)