poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 56574] Excel file crashes while opening XLSX.
Date Mon, 02 Jun 2014 05:49:27 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=56574

--- Comment #2 from Ranganath <ranganath.196@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


Mime
View raw message