I need to generate an .xls (Excel) file, using the Java library Apache POI for spreadsheets.
The file will contain a list of phone numbers in column A, formatted as \"02
Vlad: This got most of the problem done. I found that all the empty rows were formatted the way I wanted them. However rows where I had initial zeros looked and worked fine; however if I had to change a pre-existing value with another value starting with zero the zeroes disappeared. So I recommend adding code to when you create the value in the cell to reset the the setCellStyle to text. here are some snippets: method public Cell createCell(Row r!, BBjNumber cell, BBjString value!)
c!=#this!.createCell(r!, cell)
c!.setCellValue(value!)
c!.setCellStyle(#text_format!)
methodret c!
#text_format! = #wb!.createCellStyle()
#text_format!.setDataFormat(#format!.getFormat("@"))
methodend
this may help some other sole searching for initial zeroes. Thank you for posting. Alex