Below works for me.
**
HSSFCell cell = row1.createCell(i); cell.setCellType(new Double(value));
**
Note: "value" must be on numbers, it will not work with alphanumeric values. replace it everywhere (cell values) that is required.
manojgolty
source share