https://issues.apache.org/bugzilla/show_bug.cgi?id=55769
CTcreations <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID |--- --- Comment #4 from CTcreations <[email protected]> --- Am using this code...But it cannot[Neglect] empty cell... Is there any idea to get null cell in the following code ??? ....void parseExcel(File file) throws IOException { OPCPackage container; try { container = OPCPackage.open(file.getAbsolutePath()); ReadOnlySharedStringsTable strings = new ReadOnlySharedStringsTable(container); XSSFReader xssfReader = new XSSFReader(container); StylesTable styles = xssfReader.getStylesTable(); XSSFReader.SheetIterator iter = (XSSFReader.SheetIterator) xssfReader.getSheetsData(); while (iter.hasNext()) { InputStream stream = iter.next(); processSheet(styles, strings, stream); stream.close(); } protected static void processSheet(StylesTable styles, ReadOnlySharedStringsTable strings, InputStream sheetInputStream) throws IOException, SAXException { InputSource sheetSource = new InputSource(sheetInputStream); SAXParserFactory saxFactory = SAXParserFactory.newInstance(); try { SAXParser saxParser = saxFactory.newSAXParser(); XMLReader sheetParser = saxParser.getXMLReader(); ContentHandler handler = new XSSFSheetXMLHandler(styles, strings, new SheetContentsHandler() { @Override public void startRow(int rowNum) { //System.out.println("") } @Override public void endRow() { stringList.add("Row"); } @Override public void cell(String cellReference, String formattedValue) { System.out.println(formattedValue); } @Override public void headerFooter(String text, boolean isHeader, String tagName) { System.out.println(isHeader?"Header " +text:"Footer "+text ); } }, false//means result instead of formula ); sheetParser.setContentHandler(handler); sheetParser.parse(sheetSource); } catch { -- 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]
