The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> C Programming
|
Writing to Excel-can u help?
Discuss Writing to Excel-can u help? in the C Programming forum on Dev Shed. Writing to Excel-can u help? C programming forum discussing all C derivatives, including C#, C++, Object-C, and even plain old vanilla C. These languages are low level languages, and used on projects such as device drivers, compilers, and even whole computer operating systems.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

March 7th, 2002, 07:06 AM
|
|
Junior Member
|
|
Join Date: Mar 2002
Location: Ireland
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
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.
|

March 7th, 2002, 02:36 PM
|
|
Contributing User
|
|
Join Date: Oct 2000
Location: Back in the real world.
|
|
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
|
|
Junior Member
|
|
Join Date: Mar 2002
Location: Ireland
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Thanks man,
I'll give it a go!
Cheers,
Mike.
|

March 8th, 2002, 06:32 AM
|
|
Junior Member
|
|
Join Date: Mar 2002
Location: Ireland
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
But...
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.

|

March 8th, 2002, 12:10 PM
|
|
Contributing User
|
|
Join Date: Oct 2000
Location: Back in the real world.
|
|
|
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.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|