poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ssp <ssp...@gmail.com>
Subject round off digits in apache poi ss workbook
Date Sat, 14 Sep 2013 01:34:44 GMT

I am trying to round off the decimal number with precisaion value 2, but it
is not working, let me know the problem in my below code:

    CellStyle cs = wb.createCellStyle();
    DataFormat df = wb.createDataFormat();
    for (int i=14;i<rows;i++)
                    Cell  y=   wb.getSheetAt(0).getRow(i).getCell((short)
            if (y.getCellType() == Cell.CELL_TYPE_STRING) {
                    } else if (y.getCellType() == Cell.CELL_TYPE_NUMERIC) {
                            float d=(float) y.getNumericCellValue();

View this message in context: http://apache-poi.1045710.n5.nabble.com/round-off-digits-in-apache-poi-ss-workbook-tp5713756.html
Sent from the POI - User mailing list archive at Nabble.com.

To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org

View raw message