本文整理汇总了Java中net.sf.jasperreports.engine.export.JRXlsExporter.setExporterOutput方法的典型用法代码示例。如果您正苦于以下问题:Java JRXlsExporter.setExporterOutput方法的具体用法?Java JRXlsExporter.setExporterOutput怎么用?Java JRXlsExporter.setExporterOutput使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.jasperreports.engine.export.JRXlsExporter
的用法示例。
在下文中一共展示了JRXlsExporter.setExporterOutput方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: xls
import net.sf.jasperreports.engine.export.JRXlsExporter; //导入方法依赖的package包/类
/**
*
*/
public void xls() 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() + ".xls");
JRXlsExporter exporter = new JRXlsExporter();
exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration();
configuration.setOnePagePerSheet(true);
exporter.setConfiguration(configuration);
exporter.exportReport();
System.err.println("XLS creation time : " + (System.currentTimeMillis() - start));
}
示例2: xls
import net.sf.jasperreports.engine.export.JRXlsExporter; //导入方法依赖的package包/类
/**
*
*/
public void xls() 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() + ".xls");
JRXlsExporter exporter = new JRXlsExporter();
exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration();
configuration.setOnePagePerSheet(false);
exporter.setConfiguration(configuration);
exporter.exportReport();
System.err.println("XLS creation time : " + (System.currentTimeMillis() - start));
}
示例3: xls
import net.sf.jasperreports.engine.export.JRXlsExporter; //导入方法依赖的package包/类
/**
*
*/
public void xls() 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() + ".xls");
JRXlsExporter exporter = new JRXlsExporter();
exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration();
configuration.setOnePagePerSheet(true);
exporter.setConfiguration(configuration);
exporter.exportReport();
System.err.println("XLS creation time : " + (System.currentTimeMillis() - start));
}
示例4: xls
import net.sf.jasperreports.engine.export.JRXlsExporter; //导入方法依赖的package包/类
/**
*
*/
public void xls() 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() + ".xls");
JRXlsExporter exporter = new JRXlsExporter();
exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration();
configuration.setOnePagePerSheet(true);
exporter.setConfiguration(configuration);
exporter.exportReport();
System.err.println("XLS creation time : " + (System.currentTimeMillis() - start));
}
示例5: saveExcelReportToFile
import net.sf.jasperreports.engine.export.JRXlsExporter; //导入方法依赖的package包/类
/**
* Generates an XLS report from a pre-compiled report and returns it into a file.
*
* @param jasperPrint
* JasperPrint object which contains a compiled report.
* @param exportParameters
* Export parameters than can be added to configure the resulting report.
* @param file
* The file used to return the report.
* @throws JRException
* In case there is any error generating the report an exception is thrown with the
* error message.
*/
private static void saveExcelReportToFile(JasperPrint jasperPrint,
Map<Object, Object> exportParameters, File file) throws JRException {
final JRXlsExporter excelExporter = new JRXlsExporter();
SimpleExporterInput exporterInput = new SimpleExporterInput(jasperPrint);
SimpleOutputStreamExporterOutput exporterOutput = new SimpleOutputStreamExporterOutput(file);
if (exportParameters != null && exportParameters.size() > 0) {
SimpleXlsReportConfiguration exportConfiguration = getXlsConfigurationFromExportParameters(exportParameters);
excelExporter.setConfiguration(exportConfiguration);
} else {
SimpleXlsReportConfiguration reportExportConfiguration = new SimpleXlsReportConfiguration();
reportExportConfiguration.setOnePagePerSheet(false);
reportExportConfiguration.setRemoveEmptySpaceBetweenRows(true);
excelExporter.setConfiguration(reportExportConfiguration);
}
excelExporter.setExporterInput(exporterInput);
excelExporter.setExporterOutput(exporterOutput);
excelExporter.exportReport();
}
示例6: xls
import net.sf.jasperreports.engine.export.JRXlsExporter; //导入方法依赖的package包/类
/**
*
*/
public void xls() 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() + ".xls");
JRXlsExporter exporter = new JRXlsExporter();
exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration();
configuration.setOnePagePerSheet(false);
exporter.setConfiguration(configuration);
exporter.exportReport();
System.err.println("XLS creation time : " + (System.currentTimeMillis() - start));
}
示例7: xls
import net.sf.jasperreports.engine.export.JRXlsExporter; //导入方法依赖的package包/类
/**
*
*/
public void xls() 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() + ".xls");
JRXlsExporter exporter = new JRXlsExporter();
exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration();
configuration.setOnePagePerSheet(false);
exporter.setConfiguration(configuration);
exporter.exportReport();
System.err.println("XLS creation time : " + (System.currentTimeMillis() - start));
}
示例8: xls
import net.sf.jasperreports.engine.export.JRXlsExporter; //导入方法依赖的package包/类
/**
*
*/
public void xls() throws JRException
{
long start = System.currentTimeMillis();
File sourceFile = new File("build/reports/HtmlComponentReport.jrprint");
JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);
File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls");
JRXlsExporter exporter = new JRXlsExporter();
exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration();
configuration.setOnePagePerSheet(true);
exporter.setConfiguration(configuration);
exporter.exportReport();
System.err.println("XLS creation time : " + (System.currentTimeMillis() - start));
}
示例9: xls
import net.sf.jasperreports.engine.export.JRXlsExporter; //导入方法依赖的package包/类
/**
*
*/
public void xls() 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() + ".xls");
JRXlsExporter exporter = new JRXlsExporter();
exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration();
configuration.setOnePagePerSheet(false);
exporter.setConfiguration(configuration);
exporter.exportReport();
System.err.println("XLS creation time : " + (System.currentTimeMillis() - start));
}
示例10: xls
import net.sf.jasperreports.engine.export.JRXlsExporter; //导入方法依赖的package包/类
/**
*
*/
public void xls() 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() + ".xls");
JRXlsExporter exporter = new JRXlsExporter();
exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration();
configuration.setOnePagePerSheet(true);
exporter.setConfiguration(configuration);
exporter.exportReport();
System.err.println("XLS creation time : " + (System.currentTimeMillis() - start));
}
示例11: xls
import net.sf.jasperreports.engine.export.JRXlsExporter; //导入方法依赖的package包/类
/**
*
*/
public void xls() throws JRException
{
long start = System.currentTimeMillis();
File sourceFile = new File("build/reports/DateRangeReport.jrprint");
JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);
File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls");
JRXlsExporter exporter = new JRXlsExporter();
exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration();
configuration.setOnePagePerSheet(true);
configuration.setDetectCellType(true);
exporter.setConfiguration(configuration);
exporter.exportReport();
System.err.println("XLS creation time : " + (System.currentTimeMillis() - start));
}
示例12: xls
import net.sf.jasperreports.engine.export.JRXlsExporter; //导入方法依赖的package包/类
/**
*
*/
public void xls() 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() + ".xls");
JRXlsExporter exporter = new JRXlsExporter();
exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration();
configuration.setOnePagePerSheet(false);
exporter.setConfiguration(configuration);
exporter.exportReport();
System.err.println("XLS creation time : " + (System.currentTimeMillis() - start));
}
示例13: xls
import net.sf.jasperreports.engine.export.JRXlsExporter; //导入方法依赖的package包/类
/**
*
*/
public void xls() 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() + ".xls");
JRXlsExporter exporter = new JRXlsExporter();
exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration();
configuration.setOnePagePerSheet(true);
exporter.setConfiguration(configuration);
exporter.exportReport();
System.err.println("XLS creation time : " + (System.currentTimeMillis() - start));
}
示例14: xls
import net.sf.jasperreports.engine.export.JRXlsExporter; //导入方法依赖的package包/类
/**
*
*/
public void xls() 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() + ".xls");
JRXlsExporter exporter = new JRXlsExporter();
exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration();
configuration.setOnePagePerSheet(true);
exporter.setConfiguration(configuration);
exporter.exportReport();
System.err.println("Report : " + sourceFile + ". XLS creation time : " + (System.currentTimeMillis() - start));
}
}
示例15: xls
import net.sf.jasperreports.engine.export.JRXlsExporter; //导入方法依赖的package包/类
/**
*
*/
public void xls() 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() + ".xls");
JRXlsExporter exporter = new JRXlsExporter();
exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration();
configuration.setOnePagePerSheet(false);
exporter.setConfiguration(configuration);
exporter.exportReport();
System.err.println("XLS creation time : " + (System.currentTimeMillis() - start));
}