My colleague just found a way to do this. In JExcel, this can be accomplished using WritableCellFormat, for example:
WritableCellFormat numberAsTextFormat = new WritableCellFormat(NumberFormats.TEXT);
Then, when you create your cell to add to the sheet, you simply pass in the format as usual:
Label l = new Label(0, 0, stringVal, numberAsTextFormat);
If you are using the Apache POI, you must create an HSSFCellStyle and then set its data format as follows:
HSSFCellStyle style = book.createCellStyle(); style.setDataFormat(BuiltInFormats.getBuiltInFormat("text"));
source share