Board index » cppbuilder » BCB5 Office Components excelchart

BCB5 Office Components excelchart

Hi,
Can anyone provide a link or short example of how to create an excel
chart from
a dataset recieved thru odbc from sql svr 7?
I have the dataset and I have an excelapplication component on the form
along with a workbook and
worksheet components.
I get a workbook and worksheet and populate it with the data I want to
chart with these:

ExcelApplication->Connect();
ExcelApplication->Set_Visible(0,true);
ExcelApplication->Workbooks->Add(xlWBATWorksheet);
Workbook->ConnectTo(ExcelApplication->Workbooks->get_Item(1));
Worksheet->ConnectTo(Workbook->Worksheets->get_Item(1));
Worksheet->Name = WideString("Data For Charts");

I use this to populate the data into the sheet.
Worksheet->Cells->set__Default(x ,"A","High Limit");
Worksheet->Cells->set__Default(x ,"B", "Measured Value" );
Worksheet->Cells->set__Default(x ,"C", "Low Limit" );

I would like to populate one sheet with the underlying data for 10 to 20
charts...
and place the charts on another page...not a chart per page..if
possible.

Also is there a component that will let me make my sql query to the
server and then pass the dataset to excel automatically?

Any help would be appreciated.

 

Re:BCB5 Office Components excelchart


I guess there isnt anyone who knows anything about the excelchart
component..
I've tried and tried to create a chart and connectto it etc but everything i
do causes
and exception with that particular component

Other Threads