mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
25 lines
607 B
PowerShell
25 lines
607 B
PowerShell
try {. $PSScriptRoot\..\..\LoadPSD1.ps1} catch {}
|
|
|
|
|
|
. .\ConvertExcelToImageFile.ps1
|
|
|
|
$xlFileName = "C:\Temp\testPNG.xlsx"
|
|
|
|
Remove-Item C:\Temp\testPNG.xlsx -ErrorAction Ignore
|
|
|
|
$range = @"
|
|
Region,Item,Cost
|
|
North,Pear,1
|
|
South,Apple,2
|
|
East,Grapes,3
|
|
West,Berry,4
|
|
North,Pear,1
|
|
South,Apple,2
|
|
East,Grapes,3
|
|
West,Berry,4
|
|
"@ | ConvertFrom-Csv |
|
|
Export-Excel $xlFileName -ReturnRange `
|
|
-ConditionalText (New-ConditionalText Apple), (New-ConditionalText Berry -ConditionalTextColor White -BackgroundColor Purple)
|
|
|
|
Convert-ExcelXlRangeToImage -Path $xlFileName -workSheetname sheet1 -range $range -Show
|