Skip to main content

Sheets Module

getCellValue()

Get the cell value from the given columnNumber, rowNumber and sheetObject.

Data Type is determined by that cell data type. Returns '' when cell is empty or out of range

getCellValue(columnNumber: String | Number,
rowNumber: String | Number,
sheetObject) --> dataType String

Input

AttributeTypeDescription
columnNumberString / Numbercolumn number in which that cell is located in
rowNumberString / Numberrow number in which that cell is located in
sheetObjectObjectsheet object that cell is located in

Output

TypeDescription
anydata type from input. Returns '' when the cell is empty or out of range.

getColumnNumber()

Retrieves the column number of that search query. Must be exact match to results in column number.

getColumnNumber(searchQuery: String | Number,
args: {rowNumber: Number, sheetObject: Object}) --> colNum: Number

Input

AttributeTypeDescription
searchQueryString / Numberquery of the search
argsObject(optional) settings to the search
args.rowNumberNumberspecified the row number (for search to go to only 1 line, instead of all) (default : 1)
args.sheetObjectObjectspecified the sheet that the search will be in. (default: sheet)

Output

TypeDescription
Numbercolumn number. Returns Null when the search fails

getRowRange()

Retrieves the array of row from the sheet. Mostly used with other functions to retrieve single (or some) data from the range retrieval.

getRowRange(rowNumber: Number, sheetObject: {}) --> []

Input

AttributeTypeDescription
rowNumberString / Numberrow number
sheetObjectObjectsheet that will retrieved in

Output

TypeDescription
[]range

getColumnRange()

Retrieves the column value array from the sheetObject. Mostly used in functions that wants the data from the array.

getColumnRange(columnNumber: Number, sheetObject: {}) --> []

Input

AttributeTypeDescription
columnNumberString / Numbercolumn number
sheetObjectObjectsheet that will be retrieved from

Output

TypeDescription
[]array with the value in that column number

pullValue()

Pulls the value from the given cell value (in response object) and store it into the response object.

Real definition of this function is to pull the data from the given cell value, but just using response to pull the cell value from and store it in the response object.

pullValue(response: {}) --> {}

Input

AttributeTypeDescription
responseObjectresponse object of that row number.

Output

TypeDescription
{}updated response

pushValue()

Store the value (as given) to the cell, using the values in the response object.

Response key is required (given as response) in order to retrieve its cell value, using setCellValue()

pushValue(response: {}, value: any)

Input

AttributeTypeDescription
responseObjectresponse key (will retrieve cell from that
valueanynew value of that given cell

setCellValue()

Set the cell value to a given value, by using the cell value given as a1Notation.

setCellValue(a1Notation: String, value: any, sheetObject: {})

Input

AttributeTypeDescription
a1NotationStringcell value, noted in A1Notation
valueanyvalue of the cell will be
sheetObjectObjectsheet that the cell value is in (default : sheet)

Output

TypeDescription
{}updated response

createNewColumn()

Create a new column with the header name of name and settings with args object.

createNewColumn(name: any, args: {columnNumber, appendAfter, sheetObject, checkExistence})

Input

AttributeTypeDescription
nameStringvalue of the header label
argsany
args.columnNumberObjectcolumn number that it will append to
args.appendAfterBoolean if this true, the appended column will be at columnNumber + 1
args.sheetObjectObjectsheet that the column will be append from
args.checkExistanceBoolean check whether the header is already exist or not. If it already exists, then do not create new column.