glant glant - 6 months ago 49 Question

Hide the gridlines in Excel Chart winforms

My winforms application creates an excel spreadsheet with a column chart. I am trying to hide the gridlines in the Chart. Appreciate the help Thanks

'Create a Chart
Dim ChartPage As Excel.Chart
Dim xlCharts As Excel.ChartObjects
Dim myChart As Excel.ChartObject
Dim chartRange As Excel.Range

xlCharts = xlWorkSheet.ChartObjects
myChart = xlCharts.Add(10, 80, 700, 450)
ChartPage = myChart.Chart
chartRange = xlWorkSheet.Range("A10", "K13")
ChartPage.ChartType = Excel.XlChartType.xlColumnStacked


I regret I am not conversant in, but I'll bet you can quickly convert this C# interop code that will remove the gridlines: