Skip to content

do not skip empty string in shared strings so that indexes match#232

Merged
guyonroche merged 1 commit intoexceljs:masterfrom
pookong:do_not_skip_empty_shared_string
Dec 2, 2016
Merged

do not skip empty string in shared strings so that indexes match#232
guyonroche merged 1 commit intoexceljs:masterfrom
pookong:do_not_skip_empty_shared_string

Conversation

@pookong
Copy link
Copy Markdown

@pookong pookong commented Nov 28, 2016

when working with shared strings this library adds empty string into shared strings (as it should), but when the shared strings are processed into xml, the empty string is omitted

workbook with cells ['foo', '', 'bar'] creates xl/sharedStrings.xml like:

<sst xmlns="..." count="3" uniqueCount="3">
  <si><t>foo</t></si>
  <si/>
  <si><t>bar</t></si>
</sst>

with missing <t> tag in <si>

this results in missing shared string in some excel reading libs that do not count this <si> as a string

when the sheet is opened and resaved with MS Excel, the shares string includes an empty <t> tag

@guyonroche guyonroche merged commit 202593a into exceljs:master Dec 2, 2016
@guyonroche
Copy link
Copy Markdown
Collaborator

Good catch! Thanks again for the contribution

@pookong
Copy link
Copy Markdown
Author

pookong commented Dec 7, 2016

thanks for merging... and for the whole lib - it surely pulled a thorn out of my foot :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants