mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add SheetDataWriter and SheetTemplateWriter
This commit is contained in:
@@ -23,14 +23,14 @@ import org.dromara.hutool.core.date.DateUtil;
|
||||
import org.dromara.hutool.core.io.file.FileUtil;
|
||||
import org.dromara.hutool.core.lang.Console;
|
||||
import org.dromara.hutool.core.map.MapUtil;
|
||||
import org.dromara.hutool.core.util.CharsetUtil;
|
||||
import org.dromara.hutool.core.util.ObjUtil;
|
||||
import org.dromara.hutool.poi.excel.*;
|
||||
import org.dromara.hutool.poi.excel.ExcelUtil;
|
||||
import org.dromara.hutool.poi.excel.OrderExcel;
|
||||
import org.dromara.hutool.poi.excel.TestBean;
|
||||
import org.dromara.hutool.poi.excel.cell.setters.EscapeStrCellSetter;
|
||||
import org.dromara.hutool.poi.excel.reader.ExcelReader;
|
||||
import org.dromara.hutool.poi.excel.style.DefaultStyleSet;
|
||||
import org.dromara.hutool.poi.excel.style.StyleUtil;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@@ -873,13 +873,6 @@ public class ExcelWriteTest {
|
||||
writer.close();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getDispositionTest() {
|
||||
final ExcelWriter writer = ExcelUtil.getWriter(true);
|
||||
final String disposition = writer.getDisposition("测试A12.xlsx", CharsetUtil.UTF_8);
|
||||
Assertions.assertEquals("attachment; filename=\"%E6%B5%8B%E8%AF%95A12.xlsx\"", disposition);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Disabled
|
||||
public void autoSizeColumnTest() {
|
||||
|
@@ -1,6 +1,5 @@
|
||||
package org.dromara.hutool.poi.excel.writer;
|
||||
|
||||
import org.dromara.hutool.core.io.file.FileUtil;
|
||||
import org.dromara.hutool.core.map.MapUtil;
|
||||
import org.dromara.hutool.poi.excel.ExcelUtil;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -29,7 +28,7 @@ public class TemplateWriterTest {
|
||||
writer.writeRow(createRow(), false);
|
||||
}
|
||||
|
||||
writer.flush(FileUtil.file(targetDir + "templateResult.xlsx"), true);
|
||||
//writer.flush(FileUtil.file(targetDir + "templateResult.xlsx"), true);
|
||||
writer.close();
|
||||
}
|
||||
|
||||
@@ -51,7 +50,7 @@ public class TemplateWriterTest {
|
||||
writer.writeRow(createRow(), false);
|
||||
}
|
||||
|
||||
writer.flush(FileUtil.file(targetDir + "templateWithFooterResult.xlsx"), true);
|
||||
//writer.flush(FileUtil.file(targetDir + "templateWithFooterResult.xlsx"), true);
|
||||
writer.close();
|
||||
}
|
||||
|
||||
@@ -73,7 +72,7 @@ public class TemplateWriterTest {
|
||||
writer.writeRow(createRow(), false);
|
||||
}
|
||||
|
||||
writer.flush(FileUtil.file(targetDir + "templateWithFooterResult.xlsx"), true);
|
||||
//writer.flush(FileUtil.file(targetDir + "templateWithFooterNoneOneLineResult.xlsx"), true);
|
||||
writer.close();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user