How to use Excel Libraries in C++ Project

I want to read/write the excel sheet using C++.

Can please anyone suggest me how to add the excel library or include the headers ?

Inot possible than is there any other way to work on Excel using C++.
I want to read/write the excel sheet using C++.

Are you just talking about reading and writing to an existing Excel sheet, or do you need to be able to manipulate the sheet in other ways?

Last edited on
Manipulate the sheets

Adding new sheets & adding values to its rows & columns.
The project that coder777 provided a link to looks rather dated (it's a Visual Studio 6.0 project!) and only deals with .xls files, not the newer .xslx format (introduced in Office 2007.) The page does also warn that its code only a subset of the functionality ("it contains only very basic functionality...")

It is interesting in that it works without Excel, using the Structured Storage API, but that's why it's limited to old school .xls files; .xls (and Word .doc files) are structured storage files whereas .xslx (and .docx) are structured zip files containing XML files plus resources.

One of the ways Microsoft exposes the Office functionality is via the Office COM Automation API, which does require Excel to be installed on the target machine.

C++ app automates Excel (CppAutomateExcel)

I did find an open source project: SpreadsheetLight

But they only support the newer .xlsx format. (I didn't look too hard, though.)


Office 2010 for developers

And in case you're interested, this project provides an app which can be used to open a compound document /structured storage file to see what's inside.

Another OLE Doc Viewer but with editing facility
Last edited on
Topic archived. No new replies allowed.