Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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!!!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Programmatically copying charts and cells from Excel into PowerPoi Barb Reinhardt Charts and Charting in Excel 3 September 10th 08 01:16 PM
How to Get Excel Command Line Programmatically Drew Lettington Excel Programming 4 June 28th 06 11:25 PM
Generating dynamic charts based on the user input shivan4u Charts and Charting in Excel 4 February 13th 06 12:43 PM
Generating Charts in Excel Trippen Excel Discussion (Misc queries) 0 September 7th 05 11:38 PM
Create a two-line header programmatically Jeanne Conroy Excel Programming 1 November 24th 04 03:37 PM


All times are GMT +1. The time now is 08:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"