You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2014/06/02 07:49:27 UTC
[Bug 56574] Excel file crashes while opening XLSX.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56574
--- Comment #2 from Ranganath <ra...@scii.in> ---
(In reply to Dominik Stadler from comment #1)
> Can you provide the actual code that you use? Preferably as self-contained
> unit test so we can incorporate the steps into our test-suite and avoid the
Below is the code I am using to remove formula from excel file.
Row row = sheet.getRow(1);
if (row == null){
row = sheet.createRow(1);
}
Cell cell = row.getCell(1);
if(cell == null){
cell = row.createCell(1);
} else {
/** Code to remove formula from cell **/
if(cell.getCellType() == Cell.CELL_TYPE_FORMULA) {
cell.setCellFormula(null);
cell.getCellStyle().setDataFormat((short) 0);
}
/** End **/
}
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org