Excel Cell border not displayed
Posted on April 2, 2008 at 3:34pm
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
Joined: Mar 11 2008 - 11:46pm
Last seen: 15 years 2 weeks ago
Posted on March 21, 2012 at 12:53pm
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
Joined: Jan 27 2011 - 12:25pm
Last seen: 12 years 2 months ago
Posted on April 2, 2008 at 4:10pm
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.
Joined: Mar 19 2007 - 5:57am
Last seen: 16 years 1 week ago
Posted on April 2, 2008 at 4:47pm
Pls let me know how to set "View Grid line" option to see the cell boarders.
Joined: Mar 11 2008 - 11:46pm
Last seen: 15 years 2 weeks ago
Posted on April 2, 2008 at 5:46pm
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.
Joined: Mar 19 2007 - 5:57am
Last seen: 16 years 1 week ago
Posted on April 2, 2008 at 7:09pm
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....
Joined: Mar 11 2008 - 11:46pm
Last seen: 15 years 2 weeks ago
Posted on September 10, 2008 at 3:13am
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 ?
Joined: Sep 10 2008 - 3:07am
Last seen: 14 years 6 months ago
Posted on September 10, 2008 at 3:16am
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?
Joined: Sep 10 2008 - 3:07am
Last seen: 14 years 6 months ago
Posted on September 16, 2008 at 9:23pm
honeyani
Wrote:
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..!
Joined: Sep 10 2008 - 3:07am
Last seen: 14 years 6 months ago
Posted on March 16, 2009 at 11:18am
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 it
Post Edited by DEVESH GUPTA at 03/16/09 18:19
Joined: Mar 16 2009 - 11:07am
Last seen: 14 years 1 week ago
Posted on March 20, 2009 at 10:15am
In iReport, check the 'Transparent' box in the properties dialog of the field you require the border on. That fixes the problem for me.
Joined: Dec 17 2008 - 10:15am
Last seen: 7 years 4 months ago
Posted on March 23, 2009 at 10:17am
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
Joined: Mar 16 2009 - 11:07am
Last seen: 14 years 1 week ago
Posted on March 23, 2009 at 2:07pm
"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
Joined: Mar 13 2007 - 2:43am
Last seen: 8 years 4 months ago
Posted on July 14, 2009 at 9:38am
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 !!!
Joined: Apr 1 2009 - 10:07am
Last seen: 9 years 3 months ago
Posted on January 8, 2011 at 9:18pm
Joined: Jan 8 2011 - 8:48pm
Last seen: 12 years 2 months ago