mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add writeSimpleShape
This commit is contained in:
@@ -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;
|
||||
|
@@ -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();
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user