Apache POI 之 初学实战篇 (七) --- 抽取Excel内容

实战篇

抽取Excel内容

HSSFWorkbook wb = new HSSFWorkbook(new FileInputStream("wb4.xls"));

//抽取Excel中的内容
ExcelExtractor extractor = new ExcelExtractor(wb);

extractor.setFormulasNotResults(true);
extractor.setIncludeSheetNames(false);

String text = extractor.getText();
System.out.println(text);

你可能感兴趣的:(poi)