wxAutoExcel is a wxWidgets (requires v3.1 or newer) C++ library attempting to make automating Microsoft Excel easier.
Microsoft Windows, requires Microsoft Excel to be installed.
See docs/install.txt for instructions how to set-up and build wxAutoExcel and how to use it in your projects. I strongly advise to check the tutorial and bundled samples to see the basics of wxAutoExcel in action. Documentation is available at http://pbfordev.github.io/wxAutoExcel/
The simple code below: (1) starts a new Microsoft Excel instance, adds a new workbook, (2) writes a string into the A1 cell of the first worksheet of the newly added workbook, (3) sets the text color of the A1 cell to blue, and (4) displays the windows of the new Microsoft Excel instance.
#include <wx/wxAutoExcel.h>
using namespace wxAutoExcel;
// the following code is assumed to reside inside
// a function returning a bool
wxExcelApplication app = wxExcelApplication::CreateInstance();
if ( !app )
{
wxLogError(_("Failed to create an instance of MS Excel application."));
return false;
}
wxExcelWorkbook workbook = app.GetWorkbooks().Add();
if ( !workbook )
{
wxLogError(_("Failed to create a new workbook."));
return false;
}
wxExcelRange range = workbook.GetWorksheets()[1].GetRange("A1");
range = "Hello, World!";
range.GetFont().SetColor(*wxBLUE);
app.SetVisible(true);