QtExcel / QXlsx

Excel file(*.xlsx) reader/writer library using Qt 5 or 6. Descendant of QtXlsxWriter.
https://qtexcel.github.io/QXlsx/
MIT License
1.11k stars 347 forks source link

"std::bad_alloc" while create xlsx document with more then 20000 rows #93

Open thevatyak opened 4 years ago

thevatyak commented 4 years ago

Hi dear author! You have very good lib. I try create new xlsx document with 88 columns and more then 20000 rows. And catch exception "std::bad_alloc" This exception throws in "xlsxdocument.cpp" method "zipWriter.addFile(QStringLiteral("xl/worksheets/sheet%1.xml").arg(i + 1), sheet->saveToXmlData());" But if decrease rows count for 18000, all worked correct. Could you give the cue me how i can fixed it? Thank you!

j2doll commented 4 years ago

Dear @skholstinin

Sorry for the late reply.
I haven't tested on a large number.
I will register this as an issue.
Can you tell the specifications of the Qt, operating system, and hardware that ran the test?

reghtml commented 1 year ago

`Exception thrown at 0x00007FFC1892CB69 (located in WEB2DB.exe): Microsoft C++Exception: std:: bad_ Alloc, located at memory location 0x000000334B4F9E20.

Unhandled exception at 0x00007FFC1892CB69 (located in WEB2DB.exe): Microsoft C++Exception: std:: bad_ Alloc, located at memory location 0x000000334B4F9E20.`

I made the same error reading the xlsx file with 7 million lines on my end, but the small file reading is normal