How to control graph gridlines? #1543
Unanswered
0x7FFFFFFFFFFFFFFF
asked this question in
Q&A
Replies: 1 comment
-
Good question. I suspect those options are part of the newer Excel and are not supported in the DLL that I parameterize and create the xlsx with. Here I grab the xlpkg, I may have missed them $xlSourcefile = "$PSScriptRoot\testGridlines.xlsx"
Remove-Item $xlSourcefile -ErrorAction Ignore
$data = ConvertFrom-Csv @"
ID,Product,Quantity,Price,Total
12001,Nails,37,3.99,147.63
12002,Hammer,5,12.10,60.5
12003,Saw,12,15.37,184.44
12010,Drill,20,8,160
12011,Crowbar,7,23.48,164.36
"@
$c1 = New-ExcelChartDefinition -YRange "Price" -XRange "Product" -Title "Item price" -NoLegend -Height 225
$c2 = New-ExcelChartDefinition -YRange "Total "-XRange "Product" -Title "Total sales" -NoLegend -Height 225 -Row 9 -Column 15
$c3 = New-ExcelChartDefinition -YRange "Quantity"-XRange "Product" -Title "Sales volume" -NoLegend -Height 225 -Row 15
$xlpkg = $data | Export-Excel -Path $xlSourcefile -AutoFilter -AutoNameRange -AutoSize -ExcelChartDefinition $c1, $c2, $c3 -PassThru
$xlpkg.Sheet1.drawings.Axis | Format-Table
Close-ExcelPackage $xlpkg |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
When creating a graph using ImportExcel, I want to show all the graph gridlines. How to do this? I can manually show/hide them like this:

Thanks.
Beta Was this translation helpful? Give feedback.
All reactions