March 7th, 2002, 07:06 AM
Writing to Excel-can u help?
Does anybody know anything about automatically sending data from a C program to Excel for output?
Automatic population etc??
I've done some research & come across CSV files (comma spaced value) which could be read in pretty easily I think.
So, the 2 things are...
creating CSV files from within the program
sending them to Excel to open
March 7th, 2002, 02:36 PM
1. create csv: write a text file with the data in in in csv format.
2. start excel: system("msexcel myfile.csv");
this is not portable at all though
March 8th, 2002, 05:02 AM
I'll give it a go!
March 8th, 2002, 06:32 AM
The system("msexcel myfile.csv"); command did not work.
Is msexcel a DOS command because I tried to find info on it & it does not exist as far as google is concerned and the "man msexcel" in DOS does not recognise it!
March 8th, 2002, 12:10 PM
where did you find the "man" command on dos????
and no, msexcel is not a dos command. i supposed it to be the name of the executable of MS-Excel. but i looked it up and it is only called excel. supply the full path, then it will start.
... only on windows though.
look at C:\Program Files\Microsoft Office\excel.exe ...could depend on your version of office though...
another way to use would be "ole automation" (remote control) of msexcel. but i cannot tell you how to do that in c.
if you are interested, be prepared to read 1000s of docs.