View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
andriy155 andriy155 is offline
external usenet poster
 
Posts: 2
Default 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!!!