写之前,大家请先下好poi的相关jar包,网上遍地都是,不多说

这个是相关事件

// 导出按钮
$('#exportBtn').click(function(){
txtBeginDate = $('#txtBeginDate').datebox('getValue');
txtEndDate = $('#txtEndDate').datebox('getValue');
window.location.href='${CTX_ROOT}/TBoilerrunlogController?method=getExcelByBoiler&begin='+txtBeginDate+'&end='+txtEndDate+'';
});  //我是转向spring mvc的controllor里面了,我这里还给传了俩个值,一个是开始时间,一个是结束时间


controllor代码如下:



这个大概思路就是,我把提前写好的excel模板的要遍历的那一行每个cell(单元格)的样式复制出来,然后在接下来的每行每个cell都给赋予相关的样式

版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-22
  • 2022-12-23
  • 2021-12-31
  • 2021-08-28
  • 2022-12-23
猜你喜欢
  • 2021-07-21
  • 2022-12-23
  • 2022-12-23
  • 2021-05-16
  • 2022-12-23
  • 2022-12-23
  • 2021-05-30
相关资源
相似解决方案