QXlsx
QXlsx copied to clipboard
the problem is about Document::write
dear author:
my question is about Document::write(....) that
if i code some QVariantList or QStringList as the param QVariant by using Document::write(const CellReference &row_column, const QVariant) ,which will not find corresponding function in Worksheet::write. The Worksheet::write(int row, int column, const QVariant &value, const Format &format) function prototype in your file doesn't have QVariantList or QStringList case.
my code is:
QList<QStringList> datas;
QStringList vtt;
vtt <<"stt"<<"stt1"<<"stt2"<<"stt3"<<"stt4"<<"stt5"<<"stt6"<<"stt7";
datas.append(vtt);
datas.append(vtt);
datas.append(vtt);
datas.append(vtt);
datas.append(vtt);
QVariant var;
var.setValue(datas);// QList<QStringList> converts to QVariant
CellReference cell("A1:H40");
cell.setColumn(8);
cell.setRow(40);
bool ret = xlsx.write(cell,var);// the return ret is false
I just want to write 20000*25 (row * column) datas to excel at a time. such as QAxObject class. the code is: QList<QList<QString>> datas; QVariant var; listListVarToVar(dataList,var);//datatype QList<QList<QString>> converts into QVariant QAxObject *user_range = m_pWorkSheet->querySubObject("Range(const QString&)", strRang); user_range->setProperty("Value", var);//this function will achieve write whole data at a time
Dear @april-zhou
I haven't actually tested 20000 * 25. Twenty thousand is a very large number. :open_mouth:
I will register this issue. Thank you for reporting.