I had a .xlsx file to read. The file contains Japanese cells. I was surprised to read more characters that what was displayed by Excel. I dived into library code and discovered that the extra characters are phonetic attributes of the cell. unfortunately, xlsx lib handles the cell content as a RichSring class, with 2 QStrings in fragmentTexts field, and concatenates the 2 strings in the value() return QString. This is not what is expected.
Furthermore, class Cell (http://qtxlsx.debao.me/cell.html) has a method to check if the cell is RichString but provides no method to get the values. I modified the class Cell as folows:
I had a .xlsx file to read. The file contains Japanese cells. I was surprised to read more characters that what was displayed by Excel. I dived into library code and discovered that the extra characters are phonetic attributes of the cell. unfortunately, xlsx lib handles the cell content as a RichSring class, with 2 QStrings in fragmentTexts field, and concatenates the 2 strings in the value() return QString. This is not what is expected. Furthermore, class Cell (http://qtxlsx.debao.me/cell.html) has a method to check if the cell is RichString but provides no method to get the values. I modified the class Cell as folows:
xlsxcell.h const RichString *richString() const;
xlsxcell.cpp const RichString *Cell::richString() const { Q_D(const Cell); if (isRichString()) return &d->richString; return NULL; }
And could read the right cell content like this:
...
What is your opinion ?