Bug 48544

Summary: Example code XLSX2CSV fails when shared string table is missing
Product: POI Reporter: Chris Lott <apache7>
Component: XSSFAssignee: POI Developers List <dev>
Severity: normal    
Priority: P2    
Version: 3.6-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Attachments: Patch to ReadOnlySharedStringTable class constructor

Description Chris Lott 2010-01-14 07:57:40 UTC
Created attachment 24844 [details]
Patch to ReadOnlySharedStringTable class constructor

I contributed code as Bug 47757 that converts an XLSX workbook to CSV format.  The class is here:


I recently found a bug in an embedded class, ReadonlySharedStringsTable, that is triggered by a workbook that contains only numbers and therefore has no shared strings table.  I've attached a small patch that revises the constructor to check that the ArrayList of package parts is not empty before grabbing the first item.  Hope this helps.
Comment 1 Yegor Kozlov 2010-01-24 05:41:16 UTC
Thanks for the fix, applied in r902566