mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
Updated
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
try { Import-Module $PSScriptRoot\..\..\ImportExcel.psd1 } catch { throw ; return }
|
||||
#Get rid of pre-exisiting sheet
|
||||
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
|
||||
|
||||
# Get rid of pre-exisiting sheet
|
||||
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
|
||||
|
||||
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
|
||||
Remove-Item $xlSourcefile -ErrorAction Ignore
|
||||
@@ -19,7 +19,6 @@ North,North Dakota,789,640
|
||||
South,Delaware,712,508
|
||||
"@
|
||||
|
||||
|
||||
$excel = $data | Export-Excel $xlSourcefile -AutoSize -PassThru
|
||||
|
||||
Add-ConditionalFormatting -Worksheet $excel.sheet1 -Range "C2:C10" -ConditionValue '=C2=D2' -RuleType Expression -BackgroundColor Cyan
|
||||
|
||||
Reference in New Issue
Block a user