So guys here is my code. I sit here for hours and cannot find any solution
QAxWidget excel("Excel.Application");
excel.setProperty("Visible", false );
QAxObject * workbooks = excel.querySubObject("WorkBooks");
QAxObject *workbook = workbooks->querySubObject( "Open(const QString&)", FileName.c_str() );
QAxObject * worksheet = workbook->querySubObject("Worksheets(int)", 1);
worksheet->setProperty("Name", "Anlagenart1");
//here I write into the file
//now I want to save
QVariant newFileName(ResultName.c_str());
excel.setProperty("Visible", true );
workbooks->querySubObject("SaveAs (const QString&)", ResultName.c_str());
workbook->dynamicCall("SaveAs (const QString&)", ResultName.c_str());
workbook->querySubObject("SaveAs (const QString&)", ResultName.c_str());
excel.dynamicCall("SaveAs (const QVariant&)",newFileName );
workbook->querySubObject("SaveAs (const QString&)", QString("c:\test\docbyqt.xls"));
You can see that I tried almost every combination with no success....Please help me and save my day ^^
EDIT:
When I try to save it as "test.xls" ist works and the file goes to "my documents"...any other folder do not work
Bookmarks