Skip to content

Latest commit

 

History

History
47 lines (36 loc) · 2.32 KB

excel.encircle.md

File metadata and controls

47 lines (36 loc) · 2.32 KB

Excel.encircle

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

Sample

//To run the sample, be sure to put a shape named "shape1" in Sheet1.

var excel = new Excel("test.xlsx");
excel.createSheet("newSheet")
// To encircle the cell A1 by coping shape1. The new shape is default center with 50% width and 50% height of the cell A1.
.encircle("newSheet", "A1", "Sheet1", "shape1")
// To encircle the cell B1 by coping shape1. The new shape is top/center with 50% width and 50% height of the cell B1.
.encircle("newSheet", "B1", "Sheet1", "shape1", 0.25, 0.5 )				
// To encircle the cell C1 by coping shape1. The new shape is center with 50% width and 25% height of the cell C1.
.encircle("newSheet", "C1", "Sheet1", "shape1", 0.5, 0.5, 0.5, 0.25 );	

API

CallingReturning
Excel . encircle ( sheetName , position , templateSheetName , templateShapeName )Excel
Excel . encircle ( sheetName , position , templateSheetName , templateShapeName , shapeCenterXRate , shapeCenterYRate )Excel
Excel . encircle ( sheetName , position , templateSheetName , templateShapeName , shapeCenterXRate , shapeCenterYRate , shapeWidthRate , shapeHeightRate )Excel
ParametersTypeDescription
sheetNameStringThe sheet name.
positionStringThe absolute reference of the cell.
templateSheetNameStringThe template sheet name.
templateShapeNameStringThe template shape name in the template sheet.
shapeCenterXRateNumberThe The rate of the x coordinate of the shape center point to the cell width. The default is 0.5 .
shapeCenterYRateNumberThe The rate of the y coordinate of the shape center point to the cell height. The default is 0.5 .
shapeWidthRateNumberThe The rate of the shape width to the cell width. The default is 0.5 .
shapeHeightRateNumberThe The rate of the shape height to the cell height. The default is 0.5 .