Jump to content

Excel Cell border not displayed

Go to solution Solved by cwest,

Recommended Posts

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

  • Replies 14
  • Created
  • Last Reply

Top Posters In This Topic

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

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

  • 5 months later...

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

  • 5 months later...

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
Link to comment
Share on other sites

  • 3 months later...

 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);


I'm using jasperreport 3, good luck !!!/tools/fckeditor/editor/images/smiley/msn/thumbs_up.gif


Link to comment
Share on other sites

  • 1 year later...
  • 1 year later...
  • Solution

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...