add writeSimpleShape

This commit is contained in:
Looly
2024-08-11 14:09:12 +08:00
parent 191d6030ac
commit 87453459d8
33 changed files with 681 additions and 97 deletions

View File

@@ -13,7 +13,7 @@
package org.dromara.hutool.poi.excel.reader;
import org.dromara.hutool.poi.excel.ExcelUtil;
import org.dromara.hutool.poi.excel.cell.CellEditor;
import org.dromara.hutool.poi.excel.cell.editors.CellEditor;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.apache.poi.ss.usermodel.Cell;

View File

@@ -0,0 +1,24 @@
package org.dromara.hutool.poi.excel.writer;
import org.dromara.hutool.poi.excel.ExcelUtil;
import org.dromara.hutool.poi.excel.SimpleClientAnchor;
import org.dromara.hutool.poi.excel.style.LineStyle;
import org.junit.jupiter.api.Test;
import java.awt.Color;
public class WriteLineShapeTest {
@Test
void testWriteLineShape() {
// Setup
final ExcelWriter writer = ExcelUtil.getWriter("d:/test/lineShape.xlsx");
final SimpleClientAnchor clientAnchor = new SimpleClientAnchor(0, 0, 1, 1);
final LineStyle lineStyle = LineStyle.SOLID;
final int lineWidth = 1;
// Execute
writer.writeLineShape(clientAnchor, lineStyle, lineWidth, Color.RED);
writer.close();
}
}