troldal / OpenXLSX

A C++ library for reading, writing, creating and modifying Microsoft Excel® (.xlsx) files.
BSD 3-Clause "New" or "Revised" License
1.34k stars 317 forks source link

sharestring initialization error #270

Closed genyez closed 6 hours ago

genyez commented 1 day ago

A separate issue from #243

in OpenXLSX/sources/XLDocument.cpp line 821, initialization of std::string sharedStrings, I saw a weired tag of xml.

"<sst xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\" count=\"1\" uniqueCount=\"1\">\n"
                    "  <si>\n"
                    "    <t/>\n"
                    "  </si>\n"
                    "</sst>"

It would add a empty string in sharestring table, what was it for?

In addition, I found this bug back in Apr 30th. Just close it if it has been fixed, appreciate it!

aral-matrix commented 1 day ago

Indeed, this is to initialize an empty shared string table when the file is not part of the document. In my development branch, I have since moved this code to the XLSharedStrings constructor. But this is not a bug, it's literally a feature ;)