質問

I'm developing a web site using c# and MVC4. In one of the sections I have a couple of pie charts that are created using highcharts lib and are based on a table of totals next to the charts.

I need to export to excel both the table with the totals and the charts, and I need to do it in a way in which, once exported, if the table changes in excel the graph will also be updated inside the spreadsheet.

My company is using Infragistics to export to excel, so exporting the table is not a problem, but I'm not sure how to export the pie charts.

I saw this example where a pivot table is created and feed to the table, but I noticed that it is using native excel libraries instead of Infragistics, I've been trying to migrate this but can't seem to find the equivalent to Excel.Application inside Infragistics lib.

Another solution that occur to me is that maybe I can enter a formula inside a cell and have it create the pie chart but I don't think this is possible since, if I'm not wrong, the pie chart is not even included in a cell, but it is a graphic that floats inside the spreadsheet.

So if anyone has had any experience drawing a pie chart from c# to excel using Infragistics and can point me in the right direction would be much appreciated.

Thanks,

役に立ちましたか?

解決

I am a developer at Infragistics and work on the Excel library. Currently, charts will be round-tripped when a file is loaded and saved, but they cannot be manipulated or created at run-time in our object model. You can submit a feature request for this ability here: http://ideas.infragistics.com/

他のヒント

Using Infragistics, I don't know if you can create an Excel pie chart, but if you want to create it in a web or windows application, use this:

Infragistics® Chart

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top