I have already made a program that exports some information to Access database using ODBC and SQL, and I was wondering if there is a similar thing for spreadsheets and if so where I can get information on it
Thanks!
I have already made a program that exports some information to Access database using ODBC and SQL, and I was wondering if there is a similar thing for spreadsheets and if so where I can get information on it
Thanks!
If your using C as far as I know there isn't anyting to interface with Excel. If you want to do that you'll have to learn COM and take it from there. Or you might try manipulating a CSV file. search the board Or pm me for more info.
Warning: Opinions subject to change without notice
The C Library Reference Guide
Understand the fundamentals
Then have some more fun
You can use ODBC/SQL with Excel, very similar to the way you use it with Access. You just have to alter your connection string and SQL statements. Here is a C sample that demonstrates reading and writing to Excel using the windows ODBC API. You can use whatever ODBC API you are comfortable with.
Treating Excel as a database does not let you set formatting, etc. To do that you can have a look at this sample that demonstrates the binary manipulation of an Excel file or you can use the COM interfaces that Excel provides.
To use the COM interfaces you can use MFC or have a look at other COM helper libraries such as DispHelper, especially the Excel sample(also available in C++).
As mentioned, if you just want to export spreadsheet values, you should look into using a comma seperated values(csv) file. These are compatible with most spreadsheet software.
Last edited by anonytmouse; 07-28-2004 at 11:28 PM.
I think that's going to be enough for me in this situation. I was kindof leary about the whole ODBC thing anyways (took me forever to get it perfect last time)
Thanks a lot! (I haven't actually got it running yet, but I'm confident...