Java 类net.sf.jasperreports.engine.export.ooxml.JRXlsxExporter 实例源码

项目:jasperreports    文件:UnicodeApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/UnicodeReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:BookApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/BookReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(false);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:Barcode4JApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/Barcode4JReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:FontsApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/FontsReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(false);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:FormsApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/FormsReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:MapApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/MapReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:TabularApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/TabularReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(false);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:XChartApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/XYChart.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:QueryApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/QueryReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(false);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:ShapesApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/ShapesReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(false);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:XmlDataSourceApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/CustomersReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:SubreportApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/MasterReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:NoXmlDesignApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/NoXmlDesignReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(false);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:ListApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    File[] files = getFiles(new File("build/reports"), "jrprint");
    for(int i = 0; i < files.length; i++)
    {
        long start = System.currentTimeMillis();
        File sourceFile = files[i];

        JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

        File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

        JRXlsxExporter exporter = new JRXlsxExporter();

        exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
        exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
        SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
        configuration.setOnePagePerSheet(true);
        exporter.setConfiguration(configuration);

        exporter.exportReport();

        System.err.println("Report : " + sourceFile + ". XLSX creation time : " + (System.currentTimeMillis() - start));
    }
}
项目:jasperreports    文件:NoPageBreakApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/NoPageBreakReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(false);
    configuration.setRemoveEmptySpaceBetweenRows(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:XlsDataSourceApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/XlsDataSourceReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(false);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:CsvDataSourceApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    File[] files = getFiles(new File("build/reports"), "jrprint");
    for(int i = 0; i < files.length; i++)
    {
        long start = System.currentTimeMillis();
        File sourceFile = files[i];

        JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

        File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

        JRXlsxExporter exporter = new JRXlsxExporter();

        exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
        exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
        SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
        configuration.setOnePagePerSheet(false);
        exporter.setConfiguration(configuration);

        exporter.exportReport();

        System.err.println("Report : " + sourceFile + ". XLSX creation time : " + (System.currentTimeMillis() - start));
    }
}
项目:jasperreports    文件:HorizontalApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/HorizontalReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:HyperlinkApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/HyperlinkReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:MarkupApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/MarkupReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(false);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:StylesApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/StylesReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(false);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:ImagesApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/ImagesReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(false);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:CrosstabApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    File[] files = getFiles(new File("build/reports"), "jrprint");
    for(int i = 0; i < files.length; i++)
    {
        long start = System.currentTimeMillis();
        File sourceFile = files[i];

        JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

        File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

        JRXlsxExporter exporter = new JRXlsxExporter();

        exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
        exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
        SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
        configuration.setOnePagePerSheet(true);
        exporter.setConfiguration(configuration);

        exporter.exportReport();

        System.err.println("Report : " + sourceFile + ". XLSX creation time : " + (System.currentTimeMillis() - start));
    }
}
项目:jasperreports    文件:JsonDataSourceApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/JsonCustomersReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:ChartThemesApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/AllChartsReport.jrprint");
    Map<String, String> dateFormats = new HashMap<String, String>();
    dateFormats.put("EEE, MMM d, yyyy", "ddd, mmm d, yyyy");
    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);
    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(true);
    configuration.setDetectCellType(true);
    configuration.setFormatPatternsMap(dateFormats);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:BarbecueApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/BarbecueReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:XChartApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/XChartReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:IconLabelApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/IconLabelReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:StretchApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/StretchReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(false);
    configuration.setFontSizeFixEnabled(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:SpiderChartApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/SpiderChart.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:ParagraphsApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/ParagraphsReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(false);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:HibernateApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    File[] files = getFiles(new File("build/reports"), "jrprint");
    for(int i = 0; i < files.length; i++)
    {
        long start = System.currentTimeMillis();
        File sourceFile = files[i];

        JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

        File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

        JRXlsxExporter exporter = new JRXlsxExporter();

        exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
        exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
        SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
        configuration.setOnePagePerSheet(true);
        exporter.setConfiguration(configuration);

        exporter.exportReport();

        System.err.println("Report : " + sourceFile + ". XLSX creation time : " + (System.currentTimeMillis() - start));
    }
}
项目:jasperreports    文件:TableApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/TableReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(false);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:JFreeChartApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/JFreeChartReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:NoReportApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/NoReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:TableOfContentsApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/TableOfContentsReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:RotationApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/RotationReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(false);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:EjbqlApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/JRMDbReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(false);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:ScriptletApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/ScriptletReport.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setOnePagePerSheet(true);
    configuration.setProgressMonitor(new SimpleExportProgressMonitor());
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:JasperApp.java   
/**
 *
 */
public void xlsx() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/FirstJasper.jrprint");

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xlsx");

    Map<String, String> dateFormats = new HashMap<String, String>();
    dateFormats.put("EEE, MMM d, yyyy", "ddd, mmm d, yyyy");

    JRXlsxExporter exporter = new JRXlsxExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleXlsxReportConfiguration configuration = new SimpleXlsxReportConfiguration();
    configuration.setDetectCellType(true);
    configuration.setFormatPatternsMap(dateFormats);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("XLSX creation time : " + (System.currentTimeMillis() - start));
}