So I've been browsing for how to read / write excel files with Qt...I only found this one example:

Qt Code:
  1. QAxObject* excel = new QAxObject( "Excel.Application", 0 );
  2. // excel->dynamicCall("SetVisible(bool)",true);
  3. QAxObject *workbooks = excel->querySubObject( "Workbooks" );
  4. QAxObject *workbook = workbooks->querySubObject( "Open(const QString&)", "e:/tmp/test.xls" );
  5. QAxObject *sheets = workbook->querySubObject( "Worksheets" );
  6. int count = sheets->dynamicCall("Count()").toInt();
  7. QStringList sheetsList;
  8. for (int i=1; i<=count; i++)
  9. {
  10. QAxObject* sheet = sheets->querySubObject( "Item( int )", i );
  11. QString name = sheet->dynamicCall("Name()").toString();
  12. sheetsList.append(name);
  13. }
  14. workbook->dynamicCall("Close()");
  15. excel->dynamicCall( "Quit()");
To copy to clipboard, switch view to plain text mode 

compiles fine, but it crashes on execution on the line
Qt Code:
  1. QAxObject *workbook = workbooks->querySubObject( "Open(const QString&)", "e:/tmp/test.xls" );
To copy to clipboard, switch view to plain text mode 
(yes, the excel file does exist and resides in that directory. Replacing the / with \\ doesn't solve the problem)

what am I doing wrong?