PDA

View Full Version : Qt AxContainer



frenzymind
27th February 2017, 07:47
Hello.
I have old project on Qt 4.8, now I'm installed Qt 5.8
Open old project in new version.
There is some code:

Excel = new QAxObject("Excel.Application", 0);
WorkBooks = Excel->querySubObject("Workbooks");

Its work well. But next:

CurrentWorkBook = WorkBooks->querySubObject("Open(QString Filename)", filename); //old variant
qDebug()<<WorkBooks<<CurrentWorkBook;
Sheets = CurrentWorkBook->querySubObject("Sheets");

Open method works with Unknown error, but excel is opening on computer! And main problem: CurrentWorkBook is zero, so further actions are crush programm!
I generate documentation, Open method is not changed. Help please!
1236112362