Open danmaidesenling opened 2 years ago
you also created #252 - your issue is basically a duplicate of #193
you also created #252 - your issue is basically a duplicate of #193
Thank you ! Have closed #252 I will update xlsx-streamer version to 2.2.0 and try.
Hi, Can I get data formateed value from a numberic cell ?
File file = new File("C:\\Users\\Marvinh\\Desktop\\wrong_2021120932 - Análises Fopag 12.2021.xlsx"); //XSSFWorkbook xssfWorkbook = new XSSFWorkbook(file); DataFormatter formatter = new DataFormatter(); Workbook workbook = StreamingReader.builder() .rowCacheSize(100) .bufferSize(1024) .open(file); for(Sheet sheet : workbook){ for(Row row : sheet){ if(row.getRowNum() == 27){ for(Cell cell2 : row){ if(cell2.getColumnIndex() == 8){ System.out.println(formatter.formatCellValue(cell2)); } } } } }
this will occur issue withcom.monitorjbl.xlsx.exceptions.NotSupportedException at com.monitorjbl.xlsx.impl.StreamingCell.getSheet(StreamingCell.java:330) at org.apache.poi.ss.usermodel.DataFormatter.isDate1904(DataFormatter.java:313) at org.apache.poi.ss.usermodel.DataFormatter.getFormat(DataFormatter.java:309) at org.apache.poi.ss.usermodel.DataFormatter.getFormattedNumberString(DataFormatter.java:858) at org.apache.poi.ss.usermodel.DataFormatter.formatCellValue(DataFormatter.java:1011) at org.apache.poi.ss.usermodel.DataFormatter.formatCellValue(DataFormatter.java:961) at org.apache.poi.ss.usermodel.DataFormatter.formatCellValue(DataFormatter.java:940)
on System.out.println(formatter.formatCellValue(cell2));
Is there anyway to fix this in version 2.1.0 ? Or Does this be handled in the latest verison ?