cancel
Showing results for 
Search instead for 
Did you mean: 

Data formatting issue while exporting to jsp page

shaji_chandran
Participant
0 Kudos

Hi,

    I have created a jsp page in MII which will export the data in excel spreadsheet. I am using the below contentyType for the same.

response.setContentType("application/vnd.ms-excel");

I am facing some issue in the format of data when the data get displayed in excel.

I have a data in format 000130068069. But in the excel file it shows as 130068069. I mean the zero's are getting trimed since excel uses the general format for the cell by default. Can I change the format of cell to text while displaying data in excelsheet.

Please let me know how can I achieve this

Thank in advance

Shaji

Accepted Solutions (0)

Answers (1)

Answers (1)

agentry_src
Active Contributor
0 Kudos

Hi Shaji,

I am not sure whether that would work, but you could check the format of the data with the csv file extract.  Also check the raw xml to see if MII has already trimmed the leading zeroes before you do any processing with the jsp. 

Regards, Mike

shaji_chandran
Participant
0 Kudos

Michel,

           Thanks for your response. I tried with csv also but no luck. MII is not trimming the zeros because I tested with defult contentType (html) and zero's are coming properly.

I am planning to use apache POI api to create the spreadsheet. What is your suggession on this?

Thanks

Shaji