Excel and C++

Hello everyone, I'm hoping someone can help me with this. I've been tasked to write a program to read a string of data, parse it out, and format it to a spreadsheet. At first my boss allowed for it to all be in (input and output files) .csv format, so no issues there. Now he's requesting that I allow for it to read in from an excel spreadsheet. Well I was wondering if there is any way to have my C++ program open the spreadsheet and re-save it as a .csv or to read in from it. I'm using Dev C++ to write this. Any help would be appreciated!
Hi,

Using MFC you can read from excel using CDataBase class. Using CDataBase you can connect to an excel file using ODBC driver and can open a CRecordset object using SQL query like "select * from [sheet1$]". Then can move row by row using CRecordSet::MoveNext() method and can retrieve the values using CRecordSet::GetFieldValue().

If you can shell sout some bucks then you can buy a third party library "libxl" using which you can directly read from or wite to an excel.
Topic archived. No new replies allowed.