![]() |
|
#1
|
|||
|
|||
Read/ Write EXCEL files using C/C++ programmingHey pple,
Need some help in reading/ writing of MS Excel files using C or C++ programming. Thought of using C++ programming but apparently, I was unable to generate sensible results from it. 1. What is the file format that we have to save our spreadsheet as? Is it .csv file format? 2. How do we read/ write Excel files using C or C++ programming? Thanks |
|||
|
#2
|
|||
|
|||
Note that if you use Mozilla or Firefox you will find that the web page has been cleverly constructed so that the sample code is more-or-less unusable. You may have to use Internet Explorer to get something that you can cut and paste to your machine. Another thing to investigate may be OpenOffice.org (versions of this run on Windows as well as Linux). The OpenOffice.org spreadsheet program, Calc, can read and write Excel files. You may be able to find links to open software information about how it is done. I haven't tried this. (I have enough things to keep me busy; I don't need another hobby just now.) Regards, Dave |
|
#3
|
||||
|
||||
|
Saving in .CSV format is the easiest.
There is a way to hook the Excel application stub into your program. I've done it in VB. Dave's link shows how to do it in MFC. I wonder if there's a way to do it with straight API's... The mind shrinks in horror -- but it might be doable __________________
The 3 Laws of the Procrastination Society: 1) Never do today that which can be put off until tomorrow 2) Tomorrow never comes |
|
#4
|
|||
|
|||
|
Hi Dave,
This links tells how to write/read into an excel sheet using VB. Is there any way to write into an excel sheet using C code? |
|
#5
|
|||
|
|||
Re: Read/ Write EXCEL files using C/C++ programmingI have problems reading and writing excel files with c++. But for now, I create a text document (.txt) and then rename it to .xls. And you can read and write to this file like it's a text file. This is one but a bad solution. When saving, you have to leave the format as it is and when exiting, you should click 'No' when asked to save. This works, but everything gets turned to text. The formulas disappear, leaving only the solution (in text format). I'm stuck with this method until I move on to Visual C++.
|
Recent GIDBlog
Problems with the Navy (Enlisted) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Tutorial] GUI programming with FLTK | dsmith | FLTK Forum | 10 | 03-Oct-2005 15:41 |
| write a function in socket programming | dxgn | C++ Forum | 0 | 07-Jan-2005 08:48 |
| which language ? | onauc | C++ Forum | 2 | 19-Nov-2004 02:53 |
| this is from 6 files now i need fancy reports to write to the files | kilgortrout | C++ Forum | 1 | 21-May-2004 16:57 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The