Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- auto excel = new QAxObject("Excel.Application");
- auto workbooks = excel->querySubObject("Workbooks");
- auto workbook = workbooks->querySubObject("Open(const QString&)","c:\\temp\\test.xlsx");
- auto sheets = workbook->querySubObject("Worksheets");
- auto sheet = sheets->querySubObject("Item(int)", 1);
- // read the first cells in row 1..5
- for (int r = 1; (r <= 5); ++r)
- {
- auto cCell = sheet->querySubObject("Cells(int,int)",r,1);
- qDebug() << cCell->dynamicCall("Value()").toInt();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement