Excel

◷ Reading Time: 2 minutes

toExcel

Allows updating existing Excel document.

file |toExcel ()

returns an Excel document to modify.

excelRowNew

Inserts a new row at a position with new values.

document |excelRowNew (sheetName, rowIndex, columnIndex, columns, values)
  • sheetName: name of the sheet to read
  • rowIndex: zero-based row index to start inserting new rows
  • columnIndex: zero-based column index to start inserting cell values
  • columns: array of string providing the columns and their orders
  • values: array of objects (key-value)

excelRowUpdate

Updates a row at a position with new values.

document |excelRowUpdate (sheetName, rowIndex, columnIndex, columns, values)
  • sheetName: name of the sheet to read
  • rowIndex: zero-based row index to start inserting new rows
  • columnIndex: zero-based column index to start inserting cell values
  • columns: array of string providing the columns and their orders
  • values: array of objects (key-value)

excelSave

Save the excel document.

document |excelSave (path)

Examples

The sample project (Excel Example.zip) is attached at the end of the page.

Update Excel.xml

The example will read the file input_1.xlsx, add a new column at the end, and update the Excel file.

file |excelRowUpdate ('Sheet1', 0, 3, ['New Column'], list)

Create Excel.xml

The example will create a new Excel file, input_2.xlsx.

file |excelRowNew ('Sheet1', 0, 0, ['Code', 'State', 'Country'], list)
Updated on November 28, 2019

Article Attachments

Was this article helpful?

Related Articles