hi,
reading single cells from excel is fine but reading a range causes problems.
this code is fine:
QAxObject *range
= sheet
->querySubObject
("Range(QString)",
"A4:A5");
QAxObject *range = sheet->querySubObject("Range(QString)", "A4:A5");
To copy to clipboard, switch view to plain text mode
but calling this afterwards:
QVariant v
= range
->dynamicCall
("Value()");
QVariant v = range->dynamicCall("Value()");
To copy to clipboard, switch view to plain text mode
will give me a heap corruption
this will fix it but will result in memory leaks:
QVariant *v2 = new QVariant(v);
To copy to clipboard, switch view to plain text mode
deleting v2 will again result in heap corruption
anyone knows why ?
BTW: cell values: A4 = 0 and A5 = 1
Bookmarks