Open warmist opened 1 year ago
We have encountered the same error. Even though the xlsx file contains the correct header line as first line in the document.
I figured the parser always expects on import that the version info is present on the first 2 rows and looks for the header line on the 3rd row. Version output can be omitted at export by setting the parameter "--no-version".
XslxParser.cpp:22:
const auto appVersion = qApp->applicationVersion(); const auto currentVersion = QVersionNumber::fromString(appVersion); const auto TsSupportVersion = QVersionNumber(4, 5, 0); InOutParameter p{ "", "", m_ioParameter.tsVersion, {} }; if (QVersionNumber::compare(currentVersion, TsSupportVersion) >= 0) { p.tsVersion = xlsx.read(2, 1).toString(); offsetRow = 2; }
IMO it should be checked that the document contains the ts version info and only if present advance by 2 rows:
if (QVersionNumber::compare(currentVersion, TsSupportVersion) >= 0) { if (xlsx.read(1,1) == TitleHeader::TsVersion) { p.tsVersion = xlsx.read(2, 1).toString(); offsetRow = 2; } }
EDIT: github code tag is somehow messing up my code formatting...don't know how to fix that, sry for that.
Describe the bug
Xlsx exporter eats the headers.
To Reproduce Steps to reproduce the behavior:
Expected behavior
Not have an error.
Desktop (please complete the following information):
Additional context Offending line: Xlsxbuilder.cpp:41
Reasoning: