Jump to content
We've recently updated our Privacy Statement, available here ×

Exporting formats (specifically XLSX)


kburns

Recommended Posts

I am using jasper server 4.x and trying to export to XLSX. This option is available in the jasper server interface, however in Argument.class I do not see it:

    public static final java.lang.String RUN_OUTPUT_FORMAT_PDF = "PDF";
    public static final java.lang.String RUN_OUTPUT_FORMAT_JRPRINT = "JRPRINT";
    public static final java.lang.String RUN_OUTPUT_FORMAT_HTML = "HTML";
    public static final java.lang.String RUN_OUTPUT_FORMAT_XLS = "XLS";
    public static final java.lang.String RUN_OUTPUT_FORMAT_XML = "XML";
    public static final java.lang.String RUN_OUTPUT_FORMAT_CSV = "CSV";
    public static final java.lang.String RUN_OUTPUT_FORMAT_RTF = "RTF";

Any insight on this?

Link to comment
Share on other sites

  • 3 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

To answer my own question, I implemented like so.

            JasperPrint print = client.runReport(rd, reportInputMap);                 .... bunch of code ....            JRAbstractExporter myExporter;            .... bunch of code ....            myExporter = new JRXlsExporter();            response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");            myExporter.setParameter(JRExporterParameter.OUTPUT_STREAM, response.getOutputStream());            myExporter.setParameter(JRExporterParameter.JASPER_PRINT, print);            myExporter.exportReport();

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...