Bug 56022 - [PATCH] Include header and footer content in XSSFEventBasedExcelExtractor output
Summary: [PATCH] Include header and footer content in XSSFEventBasedExcelExtractor output
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.10-dev
Hardware: Macintosh All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2014-01-16 23:42 UTC by Shaun Kalley
Modified: 2014-02-02 16:44 UTC (History)
0 users

diff for this patch (12.77 KB, text/plain)
2014-01-16 23:42 UTC, Shaun Kalley
test file to go in test-data/spreadsheet (26.84 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2014-01-16 23:43 UTC, Shaun Kalley

Note You need to log in before you can comment on or make changes to this bug.
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.