Skip to content
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.

Latest commit

 

History

History
36 lines (30 loc) · 2.06 KB

excel.addShapeInRange.md

File metadata and controls

36 lines (30 loc) · 2.06 KB

Excel.addShapeInRange

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

Sample

	var excel = new Excel("test.xlsx");
	excel.createSheet("newSheet")
	.addShapeInRange("newSheet","firstCellPosition","lastCellPosition","templateSheet","shapeName")
	.addShapeInRange("newSheet","firstCellPosition","lastCellPosition","templateSheet","shapeName","text")
	.addShapeInRange("newSheet","firstCellPosition","lastCellPosition","templateSheet","shapeName","text",20,20,40,40);	// To create a shape like line by copying templateSheet's

API

CallingReturning
Excel . addShapeInRange ( sheetName , firstCellPosition , lastCellPosition , templateSheetName , templateShapeName)Excel
Excel . addShapeInRange ( sheetName , firstCellPosition , lastCellPosition , templateSheetName , templateShapeName , text)Excel
Excel . addShapeInRange ( sheetName , firstCellPosition , lastCellPosition , templateSheetName , templateShapeName , text , x1 , y1 , x2 , y2)Excel
ParametersTypeDescription
sheetNameStringThe sheet name.
firstCellPositionStringThe absolute reference of the first cell.
lastCellPositionStringThe absolute reference of the last cell.
templateSheetNameStringThe template sheet name.
templateShapeNameStringThe name of the copied shape.
textStringThe created shape's text value.
x1NumberThe x coordinate within the first cell.
y1NumberThe y coordinate within the first cell.
x2NumberThe x coordinate within the last cell.
y2NumberThe y coordinate within the last cell.