Helpful Information
 
 
Category: C Programming
Writing to Excel-can u help?

Hey,

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

Thanks,
Mike.

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 ;)

Thanks man,

I'll give it a go!

Cheers,
Mike.

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!

Any thoughts?
Hirsch?
Anyone?

Mike.
:(

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.










privacy (GDPR)