Is it possible to write into an Excel spreadsheet?
What I want to do is to read through a word document or text file and copy over certain sentences or phrases into an Excel spreadsheet. I dont know if that is possible with C or C++ but i wanted to ask because I am most comfortable using those languages.
If it is possible, can anyone give me some pointers on how I would go about doing so? And if it is not, does anyone know of any languages that can perform those actions?
Heck, I dunno know EXACTLY what COM is!
I've never used it, I've just read about it... It is an advanced topic, and it's usually going to be used with Windows programs. If you search Amazon.com for "COM Programming", you'll get some hits, but I'd want to actually see to book first.
I don't know if the definition from FOLDEC will help. It says that COM has evolved into DCOM... So, you might want to search for some DCOM info.
Here's a link to a site with more COM links.
I'm not even sure that COM will do what you want... My understanding is that, for example, it allows you to copy stuff from one Windows application to another via the Windows clipboard (i.e. Copy->Paste). And, with COM, all the fonts & windows stuff gets copied... probably the Excel formulas too.
I was thinking that COM might be an "easy" way for you.
A more "direct" approach would be to parse and edit the Excel file. (That's really what you said you wanted to do.)
At wotsit.org you can find the Excel file spec. I haven't downloaded it, but I have looked at a couple of simpler file format specs (wav and bmp), and even the simple ones give me a headache! And, I had to study some VB code to understand how to make a program read the headers. Once, I learned something from studying a snippet of Pascal code... and I've never studied Pascal...
BTW - The format at wotsit.org is for Excel 97. I've heard that they "locked-down" the file format with '97. So that Excel 79 can open files created with newer versions of Office.
[EDIT] - More rambling speculation...
What I'm trying to say is... If there is a function like ReadCell(File, Row, Column), that function would probably be considered part of COM. It could be included in the WinAPI (windows.h), or maybe there's a special COM library extension.
If you have to write the code to parse & edit the file yourself, you're going to be studying the Excel file format for ...oh ...maybe a week, and you will have to write ...oh ...maybe 100 lines of code.
Either way, you're going to learn a lot! :)