Skip to content

Latest commit

 

History

History
38 lines (31 loc) · 1.92 KB

excel.addShape.md

File metadata and controls

38 lines (31 loc) · 1.92 KB

Excel.addShape

The addShape function is established to create a shape by coping to encircle a cell. Only XSSF(xlsx,xlsm).

Sample

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

API

CallingReturning
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
ParametersTypeDescription
sheetNameStringThe sheet name.
positionStringThe absolute reference of the cell.
templateSheetNameStringThe template sheet name.
templateShapeNameStringThe name of the copied shape.
textStringThe created shape's text value.
xNumberThe x coordinate of the created shape in the cell.
yNumberThe y coordinate of the created shape in the cell.
widthNumberThe created shape's width.
heightNumberThe created shape's height.