ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   XML generating excel charts (https://www.excelbanter.com/excel-programming/440074-xml-generating-excel-charts.html)

PatrickSi

XML generating excel charts
 
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.


joel[_744_]

XML generating excel charts
 

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.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=183459

Microsoft Office Help



All times are GMT +1. The time now is 07:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com