VSRonin/QtXlsxWriter

Some minor and major issues w/ QtXlsx

Opened this issue · 5 comments

Have just started using QtXlsx ( ! nice job ! ) but am having some issues. It is likely that I will be able to fix some of them but almost certainly not all of them. Please let me know what level of interest there would be in addressing some of these. They may be related to known issues, but I couldn't find any relevant info. There may also be existing work-arounds, in which case I'd be thrilled to learn of them.

  1. At present, the package only supports "int" integer values from spreadsheets - Excel supports "long long" integers. This can be resolved by a simple change in xlsxworksheet.cpp. In the routine WorksheetPrivate::loadXmlColumnsInfo, the QVariant cell value is set with

cell->d_func()->value = value.toInt();

Changing that to

cell->d_func()->value = value.toLongLong();

resolves the big integer problem.

  1. Formulas don't seem to be working correctly. There is a fair bit of code to deal with them, but as near as I can tell, formulas are effectively just ignored.

  2. DateTime values are also not dealt with effectively. I figured out a workaround by noting which actual "double" values are really days through the cell format (isDateTimeFormat() seems correct).

  3. Generally, the output file from QtXlsx is not readable by Excel. Excel reports that there are errors (apparently in the sheetn.xml parts), which can coarsely be fixed. The fixes are not perfect, but has let me continue to make some progress in my present tasks.

Thanks

  1. Good point, should also apply on the reading side, will implement as soon as I have a spared minute
  2. Can you provide a minimal example so I can investigate the problem?
  3. Depends what methods you use. The workbooks/worksheets read() methods should handle datetimes correctly. Cell has a method isDateTime to detect if the double it contains it is a date or not
  4. see point 2

Hi
Everybody , There is a QtExcel/QXlsx project base on dbzhang800/QtXlsxWriter, but it is developed
https://github.com/QtExcel/QXlsx
A lot of error was fixed .
maybe ,you will interested on it .