long formatted strings are lost (undefined) in workbook.Sheets[] cell values #25
Labels
No Label
DBF
Dates
Defined Names
Features
Formula
HTML
Images
Infrastructure
Integration
International
ODS
Operations
Performance
PivotTables
Pro
Protection
Read Bug
SSF
SYLK
Style
Write Bug
good first issue
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sheetjs/sheetjs#25
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When js-xlsx processes a XLSX file with a long formatted text string in a cell, it somehow drops or does not process the cell value -- the value is undefined.
See the XLSX file attached to this issue: http://code.google.com/p/opendatakit/issues/detail?id=820
First half of fix is:
(the inner match expression has changed).
Since this is apparently a rich text string, it has a 'r' instead of a 't' value, so the retrieval in parseSheet, which assumes:
Will still return undefined.
This should probably still be undefined, and the readme should be updated to note that rich text in cells is not supported by the converter.
The fix to the inner match, however, should be done so that expressions are properly extracted into the Strings array.
@mitchellsundt thanks for reporting this.
I think the "Right Thing" looks like this:
.r
or some other property for the rich textlike
rFont
).t
will hold a plaintext rendering (strip out theformatting)
I'm not in front of computer now; I expect to push this later tonight
On Tue, Apr 30, 2013 at 6:42 PM, Mitch Sundt notifications@github.comwrote:
Here's a revised parseStrs that ensures that the <t>...</t> tags match at the beginning and end and do not have any XML (open angle brackets) between those tags. Strings[] objects then have .t for simple text, and .raw for XML text (because that is a raw series of XML elements -- see below)
In the parseSheet function, I did this for the 's' case:
I.e., put the XML string into the .raw field. My example XLSX file has the following for the 'raw' string:
Note that this is just a mixed series of <r> and <t> tags so it isn't wrapped by any enclosing tag
@mitchellsundt I pushed an update that puts the plaintext in the .t field even if the text is rich (and populates the .r field for plain text as well as rich text), so for plaintext uses (like CSV) this should suffice. The other half (actually parsing the rich text and generating HTML or other output) is in the pipeline.
As for missing support, the ultimate goal is 100% coverage (so any bug or missing feature is very much undesired
Thanks!
On Tue, Apr 30, 2013 at 10:05 PM, Niggler notifications@github.com wrote:
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com