mirror of
https://gitee.com/dromara/hutool.git
synced 2025-06-28 13:34:09 +08:00
add test
This commit is contained in:
parent
0ef607c5c8
commit
915b55034c
@ -576,6 +576,30 @@ public class ExcelWriteTest {
|
|||||||
writer.close();
|
writer.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Ignore
|
||||||
|
public void writeMultiSheetTest2() {
|
||||||
|
List<Map<String, Object>> rows = new LinkedList<>();
|
||||||
|
final HashMap<String, Object> map = MapUtil.newHashMap();
|
||||||
|
map.put("k1", "v1");
|
||||||
|
map.put("k2", "v2");
|
||||||
|
map.put("k3", "v3");
|
||||||
|
rows.add(map);
|
||||||
|
|
||||||
|
ExcelWriter writer = ExcelUtil.getWriter("D:\\test\\multiSheet2.xlsx", "正常数据");
|
||||||
|
writer.write(rows);
|
||||||
|
|
||||||
|
//表2
|
||||||
|
writer.setSheet("表2");
|
||||||
|
List<Map<String, Object>> rows2 = new LinkedList<>();
|
||||||
|
final HashMap<String, Object> map2 = MapUtil.newHashMap();
|
||||||
|
map2.put("x1", "v1");
|
||||||
|
rows2.add(map2);
|
||||||
|
writer.write(rows2);
|
||||||
|
|
||||||
|
writer.close();
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Ignore
|
@Ignore
|
||||||
public void writeMapsTest() {
|
public void writeMapsTest() {
|
||||||
|
Loading…
Reference in New Issue
Block a user