You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I read the value of a cell, the result string is filled with trailing whitespaces until it has the same length as the maximum of the whole column.
Is this the expected behavior?
The text was updated successfully, but these errors were encountered:
This is not the expected behavior, unless there are actually spaces in the cells. Any chance to attach a file for repro? (assuming its an xls, please zip it first, otherwise github wont accept the upload)
If you cannot share the file, if would be somewhat helpful with a hex dump of the first 8 bytes of the file, and the bytes before and around a string in the file which is being returned with trailing whitespace
Thank you for the quick response. When I open the file with Excel there are no spaces. As soon as I make a change to the original file, the spaces also disappear during import. It's an xlsx file, so I unpacked it and the spaces are already contained in the XML. So I think it's not a bug of ExcelDataReader. I just wonder why the spaces are not present when I open the file with Excel.
Curious. If I create an XLSX with spaces, its saved to the shared string table like this, and the spaces are preserved upon save and reload:
<sstxmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"count="1"uniqueCount="1">
<si>
<txml:space="preserve"> asdad a </t>
</si>
</sst>
Sounds like ExcelDataReader could implement support for the special "xml:space" attribute to handle this perfectly, and trim by default if its omitted. Backlog material :-)
When I read the value of a cell, the result string is filled with trailing whitespaces until it has the same length as the maximum of the whole column.
Is this the expected behavior?
The text was updated successfully, but these errors were encountered: