Re: [Dev-C++] how to draw a graph in a .xls file with C++
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Alfred P. R. <al...@ya...> - 2005-01-03 17:07:12
|
That should work fine, except that you're forgetting that .XLS is a formatted file. Try instead opening a text file and writing to it, then import that into Excel. BTW: you can also use " " for the separator, ",", and at least one more that I can't bring to mind.
george_y <geo...@li...> wrote: In the following simple program I have to write the code to built a graph in
the .xls output file using the two columns that have been created.
Thanks,
George
#include
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("www.xls");
int n= 0;
for(n= 0; n< 10; n++)
{
fout<< a[n]<<"\t"<
}
fout.close();
return 0;
}
<snip>
Alfred P. Reaud
|