Automation Action – Read CSV | ThinkAutomation

Automation Action: Read CSV

Read a CSV file or variable containing CSV data.

Read a CSV file or %variable% containing CSV data and assign the CSV data to a variable.

This action allows you to read a CSV file (or a %variable% containing CSV data). You can optionally delete columns from then returned CSV data and sort by a column. The column delimiter character and line endings will be automatically detected when the CSV is loaded. However the returned CSV data will always use a comma as the delimiter. Any date & datetime values will be automatically normalized to date format yyyy-MM-dd HH:mm:ss in the returned CSV data.

Specify the CSV File Name or Variable. This field can contain a file path (or %variable% containing a file path) or a %variable% containing CSV data.

Enable the Has Header Row if the CSV data contains column headers on the first row.

Deleting Columns

You can optionally delete columns from the returned CSV data. Specify a comma separated list of column header names, or column numbers (starting at 1). The source CSV file/data is not changed – this setting only affects the CSV data that is returned.

Deleting Last Rows

You can optionally delete the last x rows from the returned CSV data. Specify the number of rows to remove in the Delete Last Rows entry. For example, if this is set to 2 then the last 2 rows will be removed (before any sorting). This can be useful if you have extracted the CSV data from an Excel file (using the Lookup From Excel action) and the CSV data contains additional summary rows at the end. The source CSV file/data is not changed.

Sorting

You can sort the returned CSV data by a column. Specify the column header name or column number (starting at 1) in the Return Sorted By Column entry. You can select to sort Ascending or Descending. If you use column number here then the number relates to the new CSV columns after any columns have been deleted.

Return Top Rows

You can choose to only return the first x rows (after any sorting). Leave this entry at zero for all rows.

Return Header Row

Disable this setting if you do not want the column header row included in the returned CSV data.

Select the %variable% to receive the CSV data from the Assign CSV Data To list.

This is one action from over 180 actions included with ThinkAutomation. The ThinkAutomation business process automation (BPA) solution is designed to automate on-premises and cloud-based business processes that are triggered from incoming messages. Automate messages received by email, database updates, webhooks, web forms, web chat, SMS messages, Twitter, Teams messages, documents, local files and other messages sources. Create any number of workflow automations using the drag-and-drop low-code designer. Simple fixed pricing, with unlimited message processing reduces overall costs compared to hosted automation solutions.

You can also extend ThinkAutomation by creating your own custom automation actions using the built-in designer and C#/VB.net code editor.

Download Free 30 Day Trial

Back To Automation Actions List

ThinkAutomation Home