如何制作由jxl.jar和jasperReports.jar生成的Excel自动调整 [英] How to Make an excel autofit generated by jxl.jar and jasperReports.jar

查看:154
本文介绍了如何制作由jxl.jar和jasperReports.jar生成的Excel自动调整的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用此代码制作excel。

I am using this code to make the excel.

exporterXLS = new JExcelApiExporter();
exporterXLS.setParameter(JRXlsExporterParameter.JASPER_PRINT, jasperPrint);
exporterXLS.setParameter(JRXlsExporterParameter.OUTPUT_FILE, file2);
exporterXLS.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE);
exporterXLS.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE, Boolean.TRUE);
exporterXLS.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);
exporterXLS.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE);

我搜索了整个api,但没有找到任何可用的东西。
请帮我解决这个问题。

I searched the whole api but didn't find any thing useable. Please help me out from this problem.

任何帮助表示感谢。

推荐答案

已经有这些属性:

net.sf.jasperreports.export.xls.auto.fit.column

net.sf.jasperreports.export.xls.auto.fit.row

它们的值必须设置为 true

这篇关于如何制作由jxl.jar和jasperReports.jar生成的Excel自动调整的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆