Skip to main content
September 1, 2025
Question

How to validate CSV column headers on file upload in Appian?

  • September 1, 2025
  • 2 replies
  • 0 views

I have a requirement where users upload a CSV file, and I need to validate whether the column headers match a predefined template before parsing it into a CDT. Is there a way in Appian to check headers during file upload, preferably before running readcsvlogtoCDT()?

    2 replies

    shubhama926776
    September 1, 2025

    Use the previewcsvforimport() function from the Excel Tools plugin with the numberOfRows parameter set to 1, which will read only the first row containing the CSV headers. Extract these headers and compare them against your predefined CDT fields or expected header list or validatedocumentheaders().

    harshas2775
    September 1, 2025

    You can use the function validatedocumentheaders() from Excel Tools plugin to achieve the expected functionality.