Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 347
Default generating an excel graph with C++

I need some help to generate with a C++ programm a file in Excel format
(or at least in a way that all the information in it can be read by
Excel) containing a graph with the data I choose. As an example I
include a simple script that generates an output file with two columns
of integers and I` d like to add in it a graph in the same file so that
when you open the output file aaa.xls with Excel both the numrical data
and graph are present.

Thanks,
George

#include <fstream

using namespace std;

int main()

{

double a[10]= {1,2,3,4,5,6,7,8,9,10};

double b[10]= {11,12,13,14,15,16,17,18,19,20};

ofstream fout;

fout.open("aaa.xls");

int n= 0;

for(n= 0; n< 10; n++)

{

fout<< a[n]<<"\t"<<b[n]<<endl;

}

fout.close();

return 0;
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 339
Default generating an excel graph with C++


"george" wrote in message
...
I need some help to generate with a C++ programm a file in Excel format
(or at least in a way that all the information in it can be read by
Excel) containing a graph with the data I choose. As an example I
include a simple script that generates an output file with two columns
of integers and I` d like to add in it a graph in the same file so that
when you open the output file aaa.xls with Excel both the numrical data
and graph are present.

Thanks,
George


You need to use COM or some 3rd party library that can create Excel files.
Your best bet is probably to search for VB code that does this. Here are a
few links I found elsewhe

Articles on Office 2003 & code behind (VSTO)
http://msdn.microsoft.com/library/de...VSTMGBLab6.asp
http://msdn.microsoft.com/vstudio/of...stointro_link2
http://www.developer.com/net/cplus/article.php/3289051
http://www.officezealot.com/Office2003Zone/vsto.aspx
http://www.c-sharpcorner.com/OfficeNet.asp
http://msdn.microsoft.com/vstudio/office/default.aspx (Good ones)
http://msdn.microsoft.com/library/de...VSTMGBLab6.asp
http://msdn.microsoft.com/vstudio/of...l/excelobj.asp
http://msdn.microsoft.com/vstudio/of...vstsqlexcl.asp
http://support.microsoft.com/?kbid=306572

/ Fredrik


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Generating Excel XML with embedded char(10)s Harvey Schmidlapp Excel Discussion (Misc queries) 1 February 13th 09 05:29 PM
Generating Statistics with Excel bracket Excel Discussion (Misc queries) 2 September 26th 05 05:58 PM
Generating Charts in Excel Trippen Excel Discussion (Misc queries) 0 September 7th 05 11:38 PM
Generating excel combinations mark4006 Excel Discussion (Misc queries) 2 March 6th 05 04:40 PM
VBA Excel - Generating Sounds ajliaks[_41_] Excel Programming 2 September 19th 04 05:00 PM


All times are GMT +1. The time now is 02:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"