List of usage examples for org.apache.poi.hssf.extractor ExcelExtractor setIncludeBlankCells
public void setIncludeBlankCells(boolean includeBlankCells)
From source file:com.bayareasoftware.chartengine.ds.util.ExcelDump.java
License:Apache License
private static void runNew(String fileName) throws Exception { InputStream inp = new FileInputStream(fileName); HSSFWorkbook wb = new HSSFWorkbook(new POIFSFileSystem(inp)); ExcelExtractor xt = new ExcelExtractor(wb); xt.setFormulasNotResults(false);// w w w. ja va 2 s . co m xt.setIncludeBlankCells(true); xt.setIncludeSheetNames(false); String text = xt.getText(); String[] lines = StringUtil.splitCompletely(text, '\n'); for (int i = 0; i < lines.length; i++) { System.out.println((i + 1) + ") " + lines[i]); } System.out.println("XLS: \n" + text); }