how to validate extracted excel columns for data type and not null

Certified Associate Developer

hi, 

I am trying to upload a excel sheet and extract the values from the sheet, Would some one give an idea on  how to access each columns to find if its not null and of type "Text" . I am new to this implementation.

I am able to write an expression to fetch all rows including the header. 

Any help is appreciated.

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Associate Developer

      suggested a way to handle this requirement. 

    You can also check the following for reference:

    You can create a Map or CDT from the result. Then you can use this for further processing.

    a!localVariables(
      local!excelFile: if(
        isnull(ri!docs),
        {},
        readexcelsheetpaging(
          excelDocument: ri!docs,
          sheetNumber: 0,
          pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 1000)
    
        ).data
      ),
      local!flatten: a!flatten(local!excelFile),
      local!finaldata: {
        a!forEach(
          items: local!flatten.values,
          expression: a!map(name: index(fv!item,1), city: index(fv!item,2))
        )
      },
      local!finaldata
    )

Reply
  • +1
    Certified Associate Developer

      suggested a way to handle this requirement. 

    You can also check the following for reference:

    You can create a Map or CDT from the result. Then you can use this for further processing.

    a!localVariables(
      local!excelFile: if(
        isnull(ri!docs),
        {},
        readexcelsheetpaging(
          excelDocument: ri!docs,
          sheetNumber: 0,
          pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 1000)
    
        ).data
      ),
      local!flatten: a!flatten(local!excelFile),
      local!finaldata: {
        a!forEach(
          items: local!flatten.values,
          expression: a!map(name: index(fv!item,1), city: index(fv!item,2))
        )
      },
      local!finaldata
    )

Children