The Pragmatic Programmer

Appian, Pega, Java, DevSecOps, Quality Engineering

Read Excel File

readexcelsheet() function

Plugin: https://community.appian.com/b/appmarket/posts/excel-tools

NOTE: When deploying this plug-in, please delete all old versions of the ExportableDataSubset CDT AND update your model to point to the new version {urn:com:appian:ps:excel:types}ExportableDataSubset

a!localVariables(
  local!recordSets: readExcelSheet(
    /*The Excel document to read from*/
    excelDocument: ri!document,
    /*The sheet number to read from where 0 is the first sheet, 1 is the second sheet, etc*/
    sheetNumber: 0,
    /*The row to start reading from where 0 is the first row*/
    startRow: 0,
    /*Optional: The number of columns to read. Leave blank (or use 0) to auto detect the number of columns.*/
    numberOfColumns: 0,
    /*Optional: The Excel documents password*/
    password: null
  ).result.values,
  local!count: count(
    local!recordSets
  ),
  local!recordSets
)
a!localVariables(
  local!recordSets: readExcelSheet(
    excelDocument: ri!document,
    sheetNumber: 0,
    startRow: 0,
    numberOfColumns: 0
  ).result.values,
  local!recordSets
)
a!localVariables(
  local!recordSets: readExcelSheet(
    excelDocument: ri!document,
    sheetNumber: 0,
    startRow: 0,
    numberOfColumns: 0
  ).result.values,
  local!count: count(
    local!recordSets
  ),
  local!count
)