EXCEL Filler
Fill in values into the specified EXCEL file. If the specified file is an absolute path, a copy will be made in the working directory before making modifications.
Last updated
Fill in values into the specified EXCEL file. If the specified file is an absolute path, a copy will be made in the working directory before making modifications.
Last updated
// Returns the currently active sheet object.
let sheet0 = input.activeSheet()
// Returns the sheet object named 'product'
let sheet1 = input.sheet('product')
// Returns the sheet object at index 2 (zero-based index).
let sheet2 = input.sheet(2)
// Returns an array of all sheet objects
let sheets = input.sheets()// Some code// Returns the "A1" cell object of the currently active sheet.
let cell0 = input.activeSheet().cell('A1')
// Returns the cell object at row 0, column 0, which is the same as "A1", in the currently active sheet.
let cell1 = input.activeSheet().cell(1,1)
// Returns the specified range object in the currently active sheet.
let range = input.activeSheet().range('A1:C3')
// Renames the sheet object named "product" to "new_product".
input.sheet('product').name('new_product')// Returns the value of the "A1" cell in the currently active sheet.
let value0 = input.activeSheet().cell('A1').value()
// Sets the value of the "A1" cell in the currently active sheet to "hello".
input.activesheet().cell('A1').value('hello')
// Fills a 3x3 range of cells, starting from "A1" as the top-left corner, with values from a 3x3 2D array.
let cellA1 = input.activeSheet().cell('A1')
cellA1.value([
[1,2,3],
[4,5,6],
[7,8,9]
])
// Prints the formula of the "B2" cell.
console.log(input.activeSheet().cell('B2').formula())
// Sets the formula for the "C3" cell.
input.activeSheet().cell('C3').formula('A1+B2')// Returns the values of the "A1:B2" range in the currently active sheet as a 2D array.
let values = input.activeSheet().range('A1:B2').value()
// Fills the "A1:B2" range with values from a 2x2 2D array.
input.activeSheet().range('A1:B2').value([
[1,2],
[3,4]
])