p.kamesh.cse Posted June 21, 2017 Share Posted June 21, 2017 Hi, we are currently using ireports 5.6.0, jasperreports-6.3.0, poi-3.12 and Spring framework 4.2.5 libraries in our application. We are constructing this jasperreport with help of spring framework bean. <bean id="abcExcel" class="org.springframework.web.servlet.view.jasperreports.JasperReportsMultiFormatView"> <property name="url"> <value>/reports/abcExcel.jasper</value> </property> [/code]<property name="contentDispositionMappings"> <props> <prop key="xls">inline; filename=abcExcel.xls</prop> </props> </property> <property name="exporterParameters"> <map> <entry key="net.sf.jasperreports.engine.export.JRHtmlExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS" value="true"/> <entry key="net.sf.jasperreports.engine.export.JRXlsAbstractExporterParameter.IS_ONE_PAGE_PER_SHEET" value="false"/> [/code] <entry key="net.sf.jasperreports.engine.export.JRXlsAbstractExporterParameter.IS_DETECT_CELL_TYPE" value="true"/> </map> </property> </bean> [/code]After downloading the xls file we were not able to open the sheet and getting a popup with text " Excel found unreadable content in 'xxx.xls'. Do you want to recover the contents of this workbook? If you trust the source of this workbook, click yes.". This issue is observed only when excel sheets are downloaded from IE11 and works fine with chrome download. Link to comment Share on other sites More sharing options...
Friendly User Posted June 28, 2017 Share Posted June 28, 2017 This error message can appear if your excel sheet name is too long or contains a slash (/) or for certain date patterns. If you use dates I'd suggest to set the property property name="net.sf.jasperreports.export.xls.pattern" value="ddd, mm/dd/yyyy h:mm:ss" on an element level that contains the values. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now