How to export a chart from dotnet windows application to excel using C#

Posted by Dinee_432 under C# on 11/6/2009 | Views : 6532 | Status : [Member] | Replies : 4
In my application i will generate a chart in dotnet and i need to export the chart to the excel dynamically.


Help me with the code in C# for windows application.


Thanks




Responses

Posted by: Vuyiswamb on: 11/6/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Which control did you use to generate the charts ?

Thank you for posting at Dotnetfunda
[Administrator]

Dinee_432, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Dinee_432 on: 11/6/2009 [Member] Starter

Up
0
Down
Hi vuyiswamb,


I have stored values in a datagrid to two arrays. with that two arrays i m generating the chart, by the following code


chart1.series[0].points.databindxy(act,count);

i need to just copy that chart to an excel sheet

Dinee_432, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Dinee_432 on: 11/7/2009 [Member] Starter

Up
0
Down
I have used MS chart add on control to create a chart in dotnet and i need to export the chart to the excel file.

Dinee_432, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 11/19/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
This will Help

http://www.asp101.com/articles/jayram/exceldotnet/default.asp


http://www.codeproject.com/KB/office/Excel_Automation.aspx

http://blogs.msdn.com/erikaehrli/archive/2009/01/30/how-to-export-data-to-excel-from-an-asp-net-application-avoid-the-file-format-differ-prompt.aspx


one thing to note. The Chart export is Confusing it. look at it this way.if the data that is in the Chart is coming from a Database then you can take straight to Excel.

http://www.4guysfromrolla.com/articles/072909-1.aspx

http://www.dotnetcurry.com/ShowArticle.aspx?ID=238&AspxAutoDetectCookieSupport=1


http://www.renitech.com/index.php/aspnet-chart-control-exporting-chart-to-excel-finally


Thank you for posting at DotnetFunda

Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

Dinee_432, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response