Bug 56022

Summary: [PATCH] Include header and footer content in XSSFEventBasedExcelExtractor output
Product: POI Reporter: Shaun Kalley <shaun.kalley>
Component: XSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: P2    
Version: 3.10-dev   
Target Milestone: ---   
Hardware: Macintosh   
OS: All   
Attachments: diff for this patch
test file to go in test-data/spreadsheet

Description Shaun Kalley 2014-01-16 23:42:36 UTC
Created attachment 31217 [details]
diff for this patch

With this patch I've aimed to output text from the XSSFEventBasedExcelExtractor in the same order as XSSFExcelExtractor, namely:
- sheet name
- first header
- odd header
- even header
- cell text
- textbox text
- first footer
- odd footer
- even footer

The downside of this change is that the processing can't be done as elegantly as before using a single StringBuffer.  Now the SheetTextExtractor has to collect the cell text in its own StringBuffer and append it to the output to accommodate the fact that the headers and footers are processed only after the rows and cells.
Comment 1 Shaun Kalley 2014-01-16 23:43:33 UTC
Created attachment 31218 [details]
test file to go in test-data/spreadsheet
Comment 2 Nick Burch 2014-02-02 16:44:28 UTC
Thanks for this, applied with minor changes in r1563657.