https://issues.apache.org/bugzilla/show_bug.cgi?id=46287
--- Comment #1 from Axel Rose <[EMAIL PROTECTED]> 2008-12-02 00:20:39 PST --- Patch suggestion: --- src/java/org/apache/poi/hssf/extractor/ExcelExtractor.java (revision 722394 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=722394 )) +++ src/java/org/apache/poi/hssf/extractor/ExcelExtractor.java (working copy) @@ -46,6 +46,7 @@ private boolean formulasNotResults = false; private boolean includeCellComments = false; private boolean includeBlankCells = false; + private boolean includeHeaderFooter = true; public ExcelExtractor(HSSFWorkbook wb) { super(wb); @@ -79,6 +80,12 @@ this.includeCellComments = includeCellComments; } /** + * Should header and footer be included? Default is true + */ + public void setIncludeHeaderFooter(boolean includeHeaderFooter) { + this.includeHeaderFooter = includeHeaderFooter; + } + /** * Should blank cells be output? Default is to only * output cells that are present in the file and are * non-blank. @@ -111,7 +118,7 @@ } // Header text, if there is any - if(sheet.getHeader() != null) { + if(sheet.getHeader() != null && includeHeaderFooter) { text.append( _extractHeaderFooter(sheet.getHeader()) ); @@ -201,7 +208,7 @@ } // Finally Feader text, if there is any - if(sheet.getFooter() != null) { + if(sheet.getFooter() != null && includeHeaderFooter) { text.append( _extractHeaderFooter(sheet.getFooter()) ); -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
