QtXlsxWriter
QtXlsxWriter copied to clipboard
Is QtXlsx currently maintained?
Have just started using QtXlsx. Largely successful, but have two issues I'd like to explore. Does anyone maintain this library or is anyone willing to assist a bit in trying to modify a couple of things?
Specifically: 1) DateTimes to not appear to be handled properly and 2) does not seem to handle really big integer values.
Thanks
It is maintained in a fork: https://github.com/VSRonin/QtXlsxWriter Or a "branch out" of the library: https://github.com/QtExcel/QXlsx
Thanks
From: Luca [email protected] Sent: Tuesday, March 26, 2019 6:57 AM To: dbzhang800/QtXlsxWriter [email protected] Cc: mhkelley [email protected]; Author [email protected] Subject: Re: [dbzhang800/QtXlsxWriter] Is QtXlsx currently maintained? (#188)
It is maintained in a fork: https://github.com/VSRonin/QtXlsxWriter Or a "branch out" of the library: https://github.com/QtExcel/QXlsx
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dbzhang800/QtXlsxWriter/issues/188#issuecomment-476615423 , or mute the thread https://github.com/notifications/unsubscribe-auth/AezlM59r1sIrljAd3MCDTvjZhL49-_V2ks5vahkwgaJpZM4cJTKY . https://github.com/notifications/beacon/AezlM4WfRdePbsou2UZqCHFUxH0yKDtiks5vahkwgaJpZM4cJTKY.gif
ad 1) example
if (value->toDate() == QDate(1900,1,1)) m_sheetOrg->writeBlank(rowOffset, col, dateFormat); else m_sheetOrg->writeDateTime(rowOffset, col, value->toDateTime(), dateFormat);
ad 2) from source xlsxworksheet.cpp
`bool write(int row, int column, const QVariant &value, const Format &format=Format());
...
f (value.userType() == QMetaType::Int || value.userType() == QMetaType::UInt || value.userType() == QMetaType::LongLong || value.userType() == QMetaType::ULongLong || value.userType() == QMetaType::Double || value.userType() == QMetaType::Float) { //Number
ret = writeNumeric(row, column, value.toDouble(), format);
`
stachna:
????? Sorry, don't understand what you mean here. I think your examples show that if you have a QDateTime value, you can write it to a worksheet. And the code snippet show that if you have a LongLong value, the existing code should write it.
Unfortunately, neither addresses the question of how you would have read either the QDateTime or the LongLong in the first place.
Am I missing something?
Stachna::
Also, It didn't look like the saveXmlCellData mudule respects either the QDateTime or the LongLong anyway. Looks like if the cellType is Cell::NumberType, it always encodes the xml as a double.
????
Sorry, I did not read it carefully. From XLSX always read as QVariant and format this in source change you file extension from xlsx to zip look in woorsheets/.. and sharedStrings.xml if stored date as string - sometime whithout formting cell Q: ... really big integer values: how big
Answer is format cell:
double stored as int:
numFormat0.setNumberFormat("# ##0");
m_sheet->writeNumeric(rowOffset, col, value->toDouble(), numFormat0);
B22 = 2019-04-02 12:14:00 B24 = 123456789012345 in xml:
... <c r="B22" s="57"><v>43557.509722222225</v></c>...
... <c r="B24"><v>123456789012345</v></c> ...