Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically Generating Excel Line Charts using C#
I am trying to programmatically generate an Excel file on the server side and fill it in with the values from the database. After that, I would like to graph the data using a simple Line Chart. Finally, I want to place the chart into the spreadsheet, save the spreadsheet on the server and send it to the client. I got all of this working except the Linechart that I create has markers in it (i.e. dots indicating datapoints). I want to get rid of them, leaving only connecting lines. In Excel 11 (2003) this is really easy - you simply have to choose the right type of graph in the chart wizard. But how do I use C# for this? Here is how I use the ChartWizard: crt.ChartWizard(sourceRange, XlChartType.xlLine, Type.Missing, XlRowCol.xlColumns, 1, 1, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); Also, the final Excel spreadhseet that has been downloaded by users contains the resulting chart with markers, however, the chart is not editable. What more, the Chart button in the Excel panel is dimmed out. Strange... Your thoughts and suggestions are more than welcome!!! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically Generating Excel Line Charts using C#
Hi everyone,
I actually solved the issue. The solution is to use the chartwizard like so: crt.ChartWizard(sourceRange, XlChartType.xlLine, 2, XlRowCol.xlColumns, 1, 1, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); Sorry about buggin you with this. Hopefully, this post will be useful to somebody else. Andriy "andriy155" wrote: I am trying to programmatically generate an Excel file on the server side and fill it in with the values from the database. After that, I would like to graph the data using a simple Line Chart. Finally, I want to place the chart into the spreadsheet, save the spreadsheet on the server and send it to the client. I got all of this working except the Linechart that I create has markers in it (i.e. dots indicating datapoints). I want to get rid of them, leaving only connecting lines. In Excel 11 (2003) this is really easy - you simply have to choose the right type of graph in the chart wizard. But how do I use C# for this? Here is how I use the ChartWizard: crt.ChartWizard(sourceRange, XlChartType.xlLine, Type.Missing, XlRowCol.xlColumns, 1, 1, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); Also, the final Excel spreadhseet that has been downloaded by users contains the resulting chart with markers, however, the chart is not editable. What more, the Chart button in the Excel panel is dimmed out. Strange... Your thoughts and suggestions are more than welcome!!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Programmatically copying charts and cells from Excel into PowerPoi | Charts and Charting in Excel | |||
How to Get Excel Command Line Programmatically | Excel Programming | |||
Generating dynamic charts based on the user input | Charts and Charting in Excel | |||
Generating Charts in Excel | Excel Discussion (Misc queries) | |||
Create a two-line header programmatically | Excel Programming |