PADFile Operationscsvfile-readdatatable
Read & Parse CSV File
Reads a CSV file into a PAD DataTable with correct handling for quoted fields containing commas, embedded newlines, different delimiters (comma, semicolon, tab), and various file encodings. Includes a PowerShell fallback for malformed CSVs that the native action rejects.
Members OnlySign in or create a free account to view and copy this pattern.
Usage Notes
- For standard CSVs, Pattern 1 (native action) is all you need.
- If you see column count mismatches or garbled data, your CSV has quoted fields with embedded commas — use Pattern 2 (PowerShell).
- TrimFields: True removes leading/trailing whitespace from every cell automatically.
- Set the encoding to match your source file — UTF-8 is standard, but legacy exports from ERP systems often use ANSI.
- Always run DeleteEmptyRowsFromDataTable after the read to remove trailing blank rows from the file.
Requirements
- Power Automate Desktop 2.30+
- Variables: varCsvFilePath (Text), varCsvData (DataTable)