-
C on Excel
hi everyone,
i'm new to the board and to C programming. I was just wondering if it is possible to create a program in c that would allow me to manipulate an excel file?
If so how do i go about doing that? what do i need to know. Thank you very much in advance
-
You need to know COM programming to work with an excell document.
Another possibility is to save the excell data as a CSV file. Which can be manipulated via normal file I/O.
gg
-
Hey code plug, can you give me some links to learning COM. i visited MSDN and i couldn't get too much info, i googled it as well, and most of the info was for use with C++. Will i have to use visual c, or c++ to do COM programming?
Also how can i do so with the csv way. You weren't too specific.
-
You will definately want to use VC++ for COM programming instead of C.
VC++ makes it really easy via the #import directive (I don't know if other compilers have something similiar). But, that's getting into COM programming details that you need to learn from a book. You can try to find some online tutrials but they probably won't be enough.
Also, you want to have a solid foundation in C and C++ programming before tackling COM using those languages. Just to wet your whistle, here is simple example using COM that creates an excell workbook, worksheet, populates the worksheet, then saves it. (I found the site with a Google search).
As for CSV files, this is just a simple text format that you can save your workbooks as (using File->Save As in Excel). Since CSV files are in a text format, you can write code that reads and writes the file directly. Here's a good description of the CSV format from www.wotsit.org.
gg
-
Thank you so much. You realy help me a lot. that post on experts exchange was exactly what i was looking for. Thank you again.
personal note: This is why i really hate mircosoft. They've encapsulated all there code to the point of idiocy. I understand they are meant to be user friendly, but man i wish i could get at the codee!!! :confused: :mad: