The addShape function is established to create a shape by coping to encircle a cell. Only XSSF(xlsx,xlsm).
var excel = new Excel("test.xlsx");
excel.createSheet("newSheet")
.addShape("newSheet","A1","templateSheet","shapeName")
.addShape("newSheet","A1","templateSheet","shapeName","text")
.addShape("newSheet","A1","templateSheet","shapeName","text",90,30)
.addShape("newSheet","A1","templateSheet","shapeName","text",90,30,40,40); // To create a shape not including line by copying templateSheet's
Calling | Returning |
Excel . addShape ( sheetName , position , templateSheetName , templateShapeName) | Excel |
Excel . addShape ( sheetName , position , templateSheetName , templateShapeName , text) | Excel |
Excel . addShape ( sheetName , position , templateSheetName , templateShapeName , text, x , y) | Excel |
Excel . addShape ( sheetName , position , templateSheetName , templateShapeName , text, x , y , width , height) | Excel |
Parameters | Type | Description |
sheetName | String | The sheet name. |
position | String | The absolute reference of the cell. |
templateSheetName | String | The template sheet name. |
templateShapeName | String | The name of the copied shape. |
text | String | The created shape's text value. |
x | Number | The x coordinate of the created shape in the cell. |
y | Number | The y coordinate of the created shape in the cell. |
width | Number | The created shape's width. |
height | Number | The created shape's height. |