使用基于 Web 的 Jasper Report 在 excel 文件中出现格式错误

Formatting error in excel file using web based Jasper Report

To showing a row-column based report in pdf format where every field is showing perfectly . But in csv and xls format the some fields are not showing properly . Such as, date format showing as but when click the column field just once then the date format is showing perfectly , and for showing the big decimal number it showing exponential number but by clicking the specific exponential number its showing the actual decimal number. How to solve this kind of error?

Picture is given as example

任何无法在其单元格宽度内显示其完整格式化结果的日期、时间或数字(日期实际上只是格式化数字)将显示一系列井号(例如#######)单元格的宽度。缺少截断,因此如果列宽太窄而无法显示整个值,则 1234567890 不会显示为 123456。

这与文本不同,后者会在相邻单元格为空时 'spillover' 进入相邻单元格,或者在相邻单元格已填充时在单元格边框处截断。

加宽您的列,以便有足够的空间以单元格指定的数字格式正确显示 date/time/number。

您的科学记数法(您称为 'exponential number' 的那些)可以通过将单元格格式化为 0(如果是整数)或者如果是混合数则使用适当的小数位来解决,只要有足够的列显示结果的宽度。

请注意,某些 'impossible numbers' 例如负时间(Excel 没有规定计算或显示负时间)无论列的宽度有多大,都会显示一个充满井号的单元格。