Wednesday 15 April 2015

java - converting a numeric cell type into a text cell type in ms excel document without changing contents of the cell using open office -


How to type a numerical cell type in text cell type in MS Excel document without changing the contents of a cell using the open office Change. This cell value is then accessed by using the method of Java (POI JAR getRichStringCellValue () HSSFCELL object.)

Try it:

  HSSFWorkbook wb = ...; Data Format Format = wb.createDataFormat (); HSSFCellStyle cell style = wb.createCellStyle (); Style.setDataFormat (format.getFormat ("@")); // or "text" cell.setcel style (cellstyle);  

No comments:

Post a Comment