|
@@ -1,8 +1,6 @@
|
|
|
package org.springblade.manager.utils;
|
|
|
|
|
|
-import com.aspose.cells.Column;
|
|
|
-import com.aspose.cells.ColumnCollection;
|
|
|
-import com.aspose.cells.SaveFormat;
|
|
|
+import com.aspose.cells.*;
|
|
|
import com.spire.xls.CellRange;
|
|
|
import com.spire.xls.FileFormat;
|
|
|
import com.spire.xls.Workbook;
|
|
@@ -232,6 +230,15 @@ public class ExcelInfoUtils {
|
|
|
column.setWidth(0.1);
|
|
|
}
|
|
|
}
|
|
|
+ // 处理隐藏行
|
|
|
+ RowCollection rows = worksheet.getCells().getRows();
|
|
|
+ for (int i = 0; i < rows.getCount(); i++) {
|
|
|
+ Row row = rows.get(i);
|
|
|
+ if (row.isHidden()) {
|
|
|
+ row.setHidden(false);
|
|
|
+ row.setHeight(1);
|
|
|
+ }
|
|
|
+ }
|
|
|
// 将工作簿保存到ByteArrayOutputStream,然后转换为ByteArrayInputStream
|
|
|
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
|
|
|
workbook.save(outputStream, SaveFormat.XLSX);
|