CSV File Processing v2

CSV File Processing using JavaScript v2

This base script allows a user to open a local CSV file to apply automatic data correction, data processing and data validation checks. The corrected CSV file can then be output for saving on your computer.

All processing is carried out on the local machine and the data is NOT uploaded to the internet.

Types of data correction and validation that could be added through customisation include:

  • Trim excess spacing
  • Ensure that data columns contain strings of a correct length
  • Swap an obsolete value or values for a pre-determined equivalent
  • Ensure that a specific data field is not blank
  • Check that a specific column of data contains valid numbers above or below a certain figure
  • Ensure that a specific data field contains one of a preset list of values

An extra column could be added to the output CSV file to indicate errors found, which is useful if you want to find and remove bad data in the source application. Feedback regarding any bad data found and/or a file summary can be added as a report to the bottom of the web page.

Note that the base script is operational, but for data correction and validation to be implemented requires a small amount of customisation. This is necessary as different CSV files will have different data validation requirements.

This version stores the data that is read in memory so that extra processing can be performed on columns as a whole once all data is read(such as filtering).