|
|
@@ -182,7 +182,7 @@ public class NewExcelUtil<T> {
|
|
|
try {
|
|
|
OutputStream out = response.getOutputStream();
|
|
|
// 取出一共有多少个sheet.
|
|
|
- int sheetNo = (int) (list.size() / sheetSize);
|
|
|
+ int sheetNo = (int) Math.ceil(list.size() / sheetSize);
|
|
|
|
|
|
String dateFilename =DateFilename(sheetName);
|
|
|
for (int index = 0; index <= sheetNo; index++) {
|
|
|
@@ -251,7 +251,7 @@ public class NewExcelUtil<T> {
|
|
|
OutputStream out = null;
|
|
|
try {
|
|
|
// 取出一共有多少个sheet.
|
|
|
- double sheetNo = Math.ceil(list.size() / sheetSize);
|
|
|
+ int sheetNo = (int) Math.ceil(list.size() / sheetSize);
|
|
|
for (int index = 0; index <= sheetNo; index++) {
|
|
|
createSheet(sheetNo, index);
|
|
|
// 产生一行
|
|
|
@@ -806,7 +806,7 @@ public class NewExcelUtil<T> {
|
|
|
* @param sheetNo sheet数量
|
|
|
* @param index 序号
|
|
|
*/
|
|
|
- public void createSheet(double sheetNo, int index) {
|
|
|
+ public void createSheet(int sheetNo, int index) {
|
|
|
this.sheet = wb.createSheet();
|
|
|
this.styles = createStyles(wb);
|
|
|
// 设置工作表的名称.
|