ireportDev Posted April 2, 2008 Share Posted April 2, 2008 Hi, When I preview/export the Jasper Report to an excel sheet, it exports the jasper report data successfully but it doesn't show the border around the cell. I have attached zip file containing 2 screen shots for your reference. ExcelExport1.jpg shows how iReport does it currently. And ExcelExport2.jpg shows how I want to get it (with cell borders). Please let me know if its possible to have cell borders in exported excel sheet or not. Thanks in advance... [file name=screenshots.zip size=5513] Post edited by: ireportDev, at: 2008/04/02 15:37 Link to comment Share on other sites More sharing options...
svenn Posted April 2, 2008 Share Posted April 2, 2008 If you have Excel set to view gridlines you should see the boxes around the cells. If you are creating boxes in your report then no they will not be carried over to Excel. Items like boxee, colored items, and images are not carried over to Excel. Link to comment Share on other sites More sharing options...
ireportDev Posted April 2, 2008 Author Share Posted April 2, 2008 Pls let me know how to set "View Grid line" option to see the cell boarders. Link to comment Share on other sites More sharing options...
svenn Posted April 3, 2008 Share Posted April 3, 2008 View gridlines as I said is something that you set in Excel. How and where you set it depends on the version of Excel that you are using. Look in your Excel help to see how to turn it on in your version of Excel. Link to comment Share on other sites More sharing options...
ireportDev Posted April 3, 2008 Author Share Posted April 3, 2008 Grid is enabled in Excel. the reason why its not showing the border is that by default the background color of the cells is white. If we make bk color as "no fill" in excel it displays the cell border.Anyways thanks for ur help.... Link to comment Share on other sites More sharing options...
honeyani Posted September 10, 2008 Share Posted September 10, 2008 I'm a newbie to iReport tool. Excel cell borders are not displayed when i run the jrxml file on tomcat server .please let me know the reason behind. If i generate excel using excel viewer i'm able to see the cell borders in the gerated excel file ,but not able to find borders when we run on tomcat server as well when we try to view uisng JRViewer Preview of iReport. Can you please guide us to fix this ? Link to comment Share on other sites More sharing options...
honeyani Posted September 10, 2008 Share Posted September 10, 2008 Same issue faced ,Grid is enabled in Excel. bk color for cell existing as "no fill",...still not able to see the cell border in JRReviewer preview or when we run(jrxml) on tomcat server y? Link to comment Share on other sites More sharing options...
honeyani Posted September 17, 2008 Share Posted September 17, 2008 honeyaniWrote: Same issue faced ,Grid is enabled in Excel. bk color for cell existing as "no fill",...still not able to see the cell border in JRReviewer preview or when we run(jrxml) on tomcat server y? I fixed this.............!!! It works..! Link to comment Share on other sites More sharing options...
devgupt123 Posted March 16, 2009 Share Posted March 16, 2009 Hi I am facing the same problem ie the excel generated is without cell borders.This thread ended vaguely without any solution.I request anyone who knows the solution to post it here.I urgently require itPost Edited by DEVESH GUPTA at 03/16/09 18:19 Link to comment Share on other sites More sharing options...
jrechter Posted March 20, 2009 Share Posted March 20, 2009 In iReport, check the 'Transparent' box in the properties dialog of the field you require the border on. That fixes the problem for me. Link to comment Share on other sites More sharing options...
devgupt123 Posted March 23, 2009 Share Posted March 23, 2009 Thanks for the info but I am not using iReport. The Jasper API is directly used to export reports in xls format and the cell borders are missing.Please tell me how I can show cell borders without iReport Link to comment Share on other sites More sharing options...
mdahlman Posted March 23, 2009 Share Posted March 23, 2009 "Thanks for the info but I am not using iReport." In this case you'll get better help by posting to the JasperReports forum instead of the iReport forum. Regards,Matt Link to comment Share on other sites More sharing options...
neo_lestat Posted July 14, 2009 Share Posted July 14, 2009 Hi, I was searching for put the cell borders in excel whit jasperreport and I found it, I looked the api, you have tu pass some properties to jasperreport, I'm using this:String reportSource = "report.jasper"; HashMap parameters= new HashMap(); parameters.put(JRParameter.IS_IGNORE_PAGINATION, true); JasperReport jasperReport = (JasperReport) JRLoader.loadObject(reportSource); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, connection); JExcelApiExporter exporter = new JExcelApiExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, tempFile); exporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, false); exporter.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE, true);// These are the parameters, the first is to put the border cell and the second is to disable de background exporter.setParameter(JRXlsExporterParameter.IS_IGNORE_CELL_BORDER, false); exporter.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, false); exporter.exportReport();I'm using jasperreport 3, good luck !!!/tools/fckeditor/editor/images/smiley/msn/thumbs_up.gif Link to comment Share on other sites More sharing options...
chinboon Posted January 9, 2011 Share Posted January 9, 2011 Change the cell border property.I documented the steps that worked for me here. http://java.sg/jasper-reports-excel-not-showing-cell-border/ Link to comment Share on other sites More sharing options...
Solution cwest Posted March 21, 2012 Solution Share Posted March 21, 2012 We are using JasperServer 4.2.1 and had this problem for a while. I also found that the issue could be resolved by setting net.sf.jasperreports.export.xls.ignore.cell.border property to false as brought out by neo_lestat. I outlined how I fixed this and other related issues here: http://gotochriswest.com/blog/2012/03/20/jasperreport-excel-option/. Post Edited by cwest at 03/21/2012 19:54 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