且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ResultSet到Excel(* .xlsx)表使用Apache POI

更新时间:2022-04-10 23:09:42

你的代码有什么问题是存在一行。
cttable.setTotalsRowCount(numRows);
删除它,一切都会工作。
如果有疑问,请比较在Excel中手动创建的一些工作表的XML定义和使用Apache POI创建的定义

What's wrong with your code is a presence of a single line. "cttable.setTotalsRowCount(numRows);" Remove it and everything will work. If in doubt, compare the XML definitions of some working table created manually in Excel and the definitions created with Apache POI