Example usage for org.apache.poi.hssf.extractor ExcelExtractor getDocSummaryInformation

List of usage examples for org.apache.poi.hssf.extractor ExcelExtractor getDocSummaryInformation

Introduction

In this page you can find the example usage for org.apache.poi.hssf.extractor ExcelExtractor getDocSummaryInformation.

Prototype

public DocumentSummaryInformation getDocSummaryInformation() 

Source Link

Document

Returns the document information metadata for the document

Usage

From source file:com.frameworkset.platform.cms.searchmanager.extractors.CmsExtractorMsExcel.java

License:Open Source License

/** 
 * ?excel2003 /*w ww.  j  a  v a 2 s  .c  o  m*/
 * @param path 
 * @return 
 * @throws IOException 
 */
public String readExcel(InputStream in) throws IOException {

    String content = null;
    try {

        HSSFWorkbook wb = new HSSFWorkbook(in);
        ExcelExtractor extractor = new ExcelExtractor(wb);
        extractor.setFormulasNotResults(true);
        extractor.setIncludeSheetNames(false);
        content = extractor.getText();
        this.m_documentSummary = extractor.getDocSummaryInformation();
        this.m_summary = extractor.getSummaryInformation();
    } catch (FileNotFoundException e) {
        e.printStackTrace();
    }
    return content;
}