XML generating excel charts

P

PatrickSi

Hi,

I have an ASP webapplication that exports a dataset to an excel workbook via
XML.
My question is if it would be possible to write XML-code that automatically
draws charts in Excel based on the data exported.

Let's say I have one DataTable with 2 columns. Then I want to export the raw
data to sheet1 in excel while sheet2 plots the data from sheet1 only using
the supplied XML code.
 
J

joel

What you want to do is to put the data into a workbook that has a
template with a chart already setup and posibly has a macro already
built into the workbook.

XML data is really ascii (text) data not a workbook, but excel reads
the file and automatically creates a workbook. The problem is the XML
is text and can't contain charts and other Excel objects.


The solution is to create a template with the chart and a macro that
will read XML data . You don't even need a macro you could just
manually read the XML data into a workbook and place the data at a fixed
location. The only issue is if the data is alway the same size or will
vary in size. fixed size datta is very easy to handle in this method.
If the data size varies then you have to adjust the range of the chart.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top