I am creating a program that will have the need to call the QAXobject Excel function on different circumstances ( creating , parsing, modifying ) and it works ,
but it always takes a lot of time loading whenever i call a certain process especially if i have to read/write a 200rows x 50 columns excel file .
i wonder if it will be possible to call the QAXobject Excel application from the start of the program?
leave it open and use it when needed ( when parsing rows , saving xls, modifying )
it is like the idea to call the code from the start:
QAxObject* workbooks
= excel
->querySubObject
("WorkBooks");
QAxObject* excel = new QAxObject("Excel.Application");
QAxObject* workbooks = excel->querySubObject("WorkBooks");
To copy to clipboard, switch view to plain text mode
and just use the following code when needed
code example is setting a value of a cell
workbooks->querySubObject("Open (const QString&)", filePath);
QAxObject* workbook
= excel
->querySubObject
("ActiveWorkBook") QAxObject* worksheet
= workbook
->querySubObject
("Worksheets(int)",
1);
QAxObject* cell
= worksheet
->querySubObject
( "Cells( int, int )", rowids, coli
);
cell->setProperty("Value", ShipAddi);
workbooks->querySubObject("Open (const QString&)", filePath);
QAxObject* workbook = excel->querySubObject("ActiveWorkBook")
QAxObject* worksheet = workbook->querySubObject("Worksheets(int)", 1);
QAxObject* cell = worksheet->querySubObject( "Cells( int, int )", rowids, coli);
cell->setProperty("Value", ShipAddi);
To copy to clipboard, switch view to plain text mode
Bookmarks