Want to manipulate .xls in c++ then again in .xls format.


HI,
I m new here...and need some help...
i am just a beginner u can say...i dun knw abt OOP even...
but i need help in this project...
i dun knw from where to start even :/
any help would be appreciated....
how can i open .xls file in c++?
how will i manipulate it...?
i just want to delete some cells, want to change some alignments etc on a fixed pattern file....any help? :/
Edit: I have assumed you're talking about C++ rather then C++/CLI -- Microsoft's extended form of C++. That would allow you to use the .Net API instead. See PS for a different codeproject.com article about the .Net based solution.

If you're a beginner, then this is going to be hard work.

To manipulate an Excel sheet in C++ requires you to use COM objects and interfaces to do the work. So you've got COM to learn, if you don't already understand it, before getting to grips with the Excel objects and interfaces themselves.

This codeproject.com article shows how to use the COM API is a relatively simple way.

Accessing Excel Spreadsheets via C++
http://www.codeproject.com/Articles/15837/Accessing-Excel-Spreadsheets-via-C

Note that it's taking advantage of Visual C++'s built-in COM support, so might not even compile with GCC, etc.

Compiler COM Support
http://msdn.microsoft.com/en-us/library/h31ekh7e.aspx

Andy

PS This is the web page for all the Office SDKs...
http://msdn.microsoft.com/en-gb/office/aa905496.aspx

Use Visual Studio 2008 C++/CLI to Automate Excel
http://www.codeproject.com/Articles/28083/Use-Visual-Studio-2008-C-CLI-to-Automate-Excel
Last edited on
There are also this earlier cplusplus.com post re. Excel

Excel automation in C++
http://www.cplusplus.com/forum/windows/58312/


Topic archived. No new replies allowed.