read in info from excel spreadsheet
I tried to find this on the net and search here in the forums.
Is it possible to read info from an excel spreadsheet into a c++ program?
If you can, could you post a link to an example or post one please.
Thanks in advance,
Plex
Yes. You''d want to look into office automation objects. Since it goes way beyond the scope of a single post to explain them I''ll link you to here [microsoft.com] which is a guide to using the automation objects in Visual C++.
If you have further questions about how to do specific things once you have the appropriate automation object setup (such as how to reorder worksheets, evaluate formulas, insert charts, etc) I''d be happy to help.
If you have further questions about how to do specific things once you have the appropriate automation object setup (such as how to reorder worksheets, evaluate formulas, insert charts, etc) I''d be happy to help.
Or you could use ODBC and connect to the excel file as a database and pull data using SQL queries, crazy easy and takes a very small amount of code to do, especially if you use the MFC CDatabase class. You can connect to excel, access, mysql, and likely many others using this method.
[edited by - DrEvil on June 3, 2004 4:46:19 PM]
[edited by - DrEvil on June 3, 2004 4:46:19 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement