From: Nick Burch Date: Sat, 27 Oct 2007 22:49:57 +0000 (+0000) Subject: Update changes list, and add text extraction to the HSSF docs X-Git-Tag: REL_3_0_2_BETA1~20 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8a2abe015ec814cc9224a168e98372a60133aec4;p=poi.git Update changes list, and add text extraction to the HSSF docs git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@589232 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/documentation/content/xdocs/changes.xml b/src/documentation/content/xdocs/changes.xml index e4e67bee6d..69c3eb8701 100644 --- a/src/documentation/content/xdocs/changes.xml +++ b/src/documentation/content/xdocs/changes.xml @@ -36,6 +36,7 @@ + Include an Excel text extractor, and put all existing text extractors under a common superclass Improvements to the LZW compression engine used by HDGF HSSFPicture.resize() - a handy method to reset a picture to its original width and height Add a getSheetIndex(HSSFSheet) method to HSSFWorkbook, and allow a HSSFSheet to get at its parent HSSFWorkbook diff --git a/src/documentation/content/xdocs/hssf/quick-guide.xml b/src/documentation/content/xdocs/hssf/quick-guide.xml index 6c86ed2df6..53a176e0ba 100644 --- a/src/documentation/content/xdocs/hssf/quick-guide.xml +++ b/src/documentation/content/xdocs/hssf/quick-guide.xml @@ -41,6 +41,7 @@
  • How to create cells
  • How to create date cells
  • Working with different types of cells
  • +
  • Text Extraction
  • Aligning cells
  • Working with borders
  • Fills and color
  • @@ -233,6 +234,24 @@ fileOut.close(); + +
    Text Extraction +

    For most text extraction requirements, the standard + ExcelExtractor class should provide all you need.

    + + InputStream inp = new FileInputStream("workbook.xls"); + HSSFWorkbook wb = new HSSFWorkbook(new POIFSFileSystem(inp)); + ExcelExtractor extractor = new ExcelExtractor(wb); + + extractor.setFormulasNotResults(true); + extractor.setIncludeSheetNames(false); + String text = extractor.getText(); + +

    For very fancy text extraction, XLS to CSV etc, + take a look at + /src/scratchpad/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java +

    +
    Fills and colors diff --git a/src/documentation/content/xdocs/status.xml b/src/documentation/content/xdocs/status.xml index 92050159aa..22be5a09fb 100644 --- a/src/documentation/content/xdocs/status.xml +++ b/src/documentation/content/xdocs/status.xml @@ -33,6 +33,7 @@ + Include an Excel text extractor, and put all existing text extractors under a common superclass Improvements to the LZW compression engine used by HDGF HSSFPicture.resize() - a handy method to reset a picture to its original width and height Add a getSheetIndex(HSSFSheet) method to HSSFWorkbook, and allow a HSSFSheet to get at its parent HSSFWorkbook