mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-14 15:23:15 +00:00
added xlrange to image example
This commit is contained in:
19
Examples/XlRangeToImage/XlRangeToImage.ps1
Normal file
19
Examples/XlRangeToImage/XlRangeToImage.ps1
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
ipmo .\ImportExcel.psd1 -Force
|
||||||
|
|
||||||
|
. .\ConvertExcelToImageFile.ps1
|
||||||
|
|
||||||
|
$xlFileName = "C:\Temp\testPNG.xlsx"
|
||||||
|
|
||||||
|
rm C:\Temp\testPNG.xlsx -ErrorAction Ignore
|
||||||
|
|
||||||
|
@"
|
||||||
|
Region,Item,Cost
|
||||||
|
North,Pear,1
|
||||||
|
South,Apple,2
|
||||||
|
East,Grapes,3
|
||||||
|
West,Berry,4
|
||||||
|
"@ | ConvertFrom-Csv |
|
||||||
|
Export-Excel $xlFileName `
|
||||||
|
-ConditionalText (New-ConditionalText Apple), (New-ConditionalText Berry -ConditionalTextColor White -BackgroundColor Purple)
|
||||||
|
|
||||||
|
Convert-XlRangeToImage -Path $xlFileName -workSheetname sheet1 -range A1:C5 -Show
|
||||||
Reference in New Issue
Block a user