Creating Charts in Excel

I have an XLL made using the XLW shell for the Excel C API. I would like to be able to programmatically create diagrams in excel using the data stored in some objects in XLL. Is this possible, and if so, what is the best way to do this? I believe that one way to do this is through COM, but I would like to avoid it, if at all possible. Currently used is Excel 2007 for Windows 7 and VS2010.

Edit: In general, what does the excel API that supports program diagrams do? Can someone point me to some kind of documentation?

Edit2: Since I am not getting any punches, I will try to give a little more detail than I am trying to do this. I want to call a formula from Excel, for example = PlotCurve ("CurvreHandle"), and I want to get a curve object stored in memory and owned by XLL (unmanaged code), get some data from it and display it on a diagram somewhere on the sheet, where PlotCurve was made. From what I have been able to trace so far, the C API, which is an XLW shell, does not support the second part of the problem, so I need to switch to COM (which I don’t know how to mix with the already running C api) or some .net -interactions that I also don’t know how to do. If someone has ever done something like this or knows a safe and stable way to do this, I would love to hear it. Thanks

+3
source share
2 answers

You can use http://xll.codeplex.com and Excel4 / Excel12. ExcelX can be used to manage memory. The command to use is xlcChartWizard.

+1
source

To create, modify, and save charts in Excel programmatically, you can use C ++ classes in the namespace Microsoft.Office.Interop.Excel.

0
source

All Articles