Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 1.34 KB

excel.setCell.md

File metadata and controls

33 lines (24 loc) · 1.34 KB

Excel.setCell

The setCell function is established to set a value and styles etc into a cell.

Sample

var excel = new Excel("test.xlsx");
excel.createSheet("newSheet")
.setCell("newSheet", "A1", "hell world!")					// To set a value into a cell.
.setCell("newSheet", "B1", "hell world!", "Sheet1", "A1")	// To set a value into a cell and to copy styles from another cell.
.setCell("newSheet", "C1", null, "Sheet1", "A2");			// If value is null, it will try to set the formula.

API

CallingReturning
Excel . setCell ( sheetName , position , value )Excel
Excel . setCell ( sheetName , position , value , templateSheetName , templatePosition )Excel
ParametersTypeDescription
sheetNameStringThe sheet name.
positionStringThe absolute reference of the cell.
valueString | Number | Date | Boolean | nullThe value for setting into a cell. If it is null, it will try to set the formula.
templateSheetNameStringThe template sheet name.
templatePositionStringThe absolute reference of the template cell.