From Suraj Pilai and Hijlko: CSV File Import Gets Some Great Internationalization Improvements

The ConvertCSVToRecords action has been upgraded to add the following features:

Support for Non-US Separators

Contributor Hijlko added this useful improvement. With it, you can import CSV files containing values that use non-comma separators like semicolons. Standard US csv uses a comma as a field separator while most European csv’s use a semicolon as a field seperator.The code can now import muli region CSV files
Numbers/currency like 1,2345.56 (US) and 1.234,56 (EU) are converted to 1234.56

You can now set the following:

  • Field Separator
  • Thousand Separator
  • Decimal Separator
  • Currency Symbol

If these inputs are left empty, the existing default values will be used.

Support for Non-US Dates

Date values in the formats YYYY-MM-DD and DD-MM-YYYY (or with non-hyphen separators like YYYY/MM/DD and DD/MM/YYYY) are now automatically converted to YYYY-MM-DD, which is the Salesforce standard.

Additional Robustness in Handling Non-Alphabetical Characters

Contributor Suraj Pilai has improved this action so that CSV’s with the following characteristics will now be properly processed:

  • Rows/File beginning and ending with quotes
  • Newline characters within columns
  • Null columns at the end of a row
  • Supports the CSV spec definition of double quotes, which is represented by consecutive double quotes ("") within a column enclosed in double quotes:

Option to Trim Leading and Trailing Spaces

Set isTrim to true to have any leading or trailing spaces removed.

Install here.