我现在需要实现这么一个功能,
先用EXCEL做好一个报表模版,然后根据这个摸板把数据添入
对于简单的把数据导出到EXCEL ,我知道可以用POI插件完成。
就是不知道怎么实现EXCEL模版和根据这个模版来写入数据
那位大侠有写过类似的程序,能发我些资料吗。
我的油箱是[email protected]
不胜感谢
先用EXCEL做好一个报表模版,然后根据这个摸板把数据添入
对于简单的把数据导出到EXCEL ,我知道可以用POI插件完成。
就是不知道怎么实现EXCEL模版和根据这个模版来写入数据
那位大侠有写过类似的程序,能发我些资料吗。
我的油箱是[email protected]
不胜感谢
解决方案 »
- ss搭建 Error creating bean with name 'sessionFactory'
- 遇到一个很奇怪的spring的security的问题
- HttpSessionBindingListener记录用户登陆问题
- 采用jocky混淆java代码的问题
- 求助,关于spring+hibernate
- 为什么没这个超连接不能正常加载新页面?在线等!
- Servlet写的登录页面
- JS右下角弹窗
- 为什么拔掉网线时,用jbuilder4 run jsp 会报错???
- 请教Jsoup分析网页html的问题
- js怎么才能把utf-8转换成GBK????
- 高手进:java语言截取字符串(搜索时用,去空格)
Map beans = new HashMap(); beans.put("campaingns", campaigns);
beans.put("dateList", DateUtils.getDateList(startDate, endDate));
beans.put("beginDate", request.getParameter("c_begindate").replace("-", "/"));
beans.put("endDate", request.getParameter("c_enddate").replace("-", "/"));
XLSTransformer transformer = new XLSTransformer();
InputStream is = null;
try {
is = new FileInputStream("/home/www/example.xls");
HSSFWorkbook wb = transformer.transformXLS(is, beans);
String xlsTempFile="/home/www/target.xls"
File xlsFile = new File(xlsTempFile);
FileOutputStream fileOut = new FileOutputStream(xlsFile);
wb.write(fileOut);
fileOut.close(); } catch (IOException e) {
//log("Error writing report output", e);
//throw new ServletException(e.getMessage(), e);
} finally {
is.close();
}
<jx:forEach items="${campaign.sitemediums}" var="site">
${campaign.name} ${site.name}
</jx:forEach>
</jx:forEach>