Bug 57930 - XSSF sample SAX code does not handle inlineStr cells
Summary: XSSF sample SAX code does not handle inlineStr cells
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.11-FINAL
Hardware: PC Mac OS X 10.1
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2015-05-15 17:56 UTC by PJ Fanning
Modified: 2016-03-31 14:44 UTC (History)
0 users



Attachments
Attaching java code that can handle inlineStr format (5.24 KB, text/plain)
2015-05-15 20:32 UTC, PJ Fanning
Details

Note You need to log in before you can comment on or make changes to this bug.
Description PJ Fanning 2015-05-15 17:56:00 UTC
The sample code is in:
http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/xssf/eventusermodel/examples/FromHowTo.java

The sample handles this well:
<c r="A2" t="str">
  <v>sample</v>
</c>

But it doesn't handle this format:
<c r="A2">
  <is><t>sample</t></is>
</c> 

I can provide a modified FromHowTo.java if that helps.
Comment 1 PJ Fanning 2015-05-15 20:32:36 UTC
Created attachment 32739 [details]
Attaching java code that can handle inlineStr format
Comment 2 Dominik Stadler 2016-03-31 14:44:14 UTC
Applied via r1737247, thanks for the Patch!

I only applied the changes for inline strings and did not switch to StringBuilder as I don't think it will change much as almost always the whole string is sent in one go and we would be constructing additional StringBuilders for every string this ways, let me know if you think it actually is required or has a large performance gain.