- CSV files can get corrupted and become unusable for many reasons.
- Below, you'll find a list of solutions to restore such a file, depending on what caused the problem.
- For other tutorials on almost everything software-related, see the Troubleshooting page.
- Similar guides can be found in our Office 365 collection of articles, so take a look.
A CSV file, otherwise known as a comma-separated values file is a format that stores alphanumeric tabular structure data but in plain text format.
Such files have data records, each of which is a collection of at least two (or more) fields separated by commas. These can be imported or exported from software programs such as Excel or Open Office Calc, which store data in row-column structure.
Among the causes of a corrupted CSV file are:
- ASCII control characters at the end of line that cannot be printed
- Separator characters in the text of the CSV files
- Line breaks in the fields that have no double quotes enclosing them
- Using invalid characters such as -, (), .,:, * and others
- Blank lines at the end of the corrupted CSV file that have a separator
- Long numbers that have leading zeros
- An invalid CSV file format
- CSV file not using UTS (8 encoding)
To fix a corrupted CSV file, we’ve listed below some solutions to help you recover your document back in a usable format.
Before jumping to solutions, we might as well suggest that you use a third-party recovery tool that will do the job for you. It might be less time consuming, especially if you’re less of a tech geek.
On this note, Stellar Data Recovery is an excellent option. In order to discover more about this tool, just check out our awesome Stellar Data Recovery review.
That’s your chance to recover for free up to 1 GB of lost or deleted documents, email data files, videos, photos, including data from a corrupt or malware-infected drive.
You can use it for both your Windows 10 PC or an external hard drive and it is compatible with hundreds of file formats, csv. included.
Stellar Data Recovery
Restore your corrupted CSV files to their original form in just a few steps, using this simple and efficient tool.
How can I recover corrupted CSV files?
- Use another software to open the CSV file or Import and repair in Excel
- Use Unicode UTF-8 encoding
- Specific solutions
- Use Notepad or Excel to create a CSV file and repair it
- Recover using Autorecover feature
- Recover using TMP file
- Recover the corrupted CSV file from a previous version
1. Use another software to open the CSV file or Import and repair in Excel
- Open Excel – new workbook.
- Click Data tab.
- Select From Text under the Get External Data section.
- Browse the corrupted CSV file.
- Click Import.
- Choose Delimiter and Next.
- Select Comma and click Next.
- Click the column with the numbers and click Text.
- Repeat the steps for all the columns with numbers and click OK.
Note: Do the above each time the file is opened in Excel.
If you need to open .csv files (or other Spreadsheet files) on Windows 10 and you can’t do this, you can always use third-party solutions.
We recommend File Viewer Plus, a universal file viewer for Windows that can open over 300 different file types, CSV included. Other file types are documents, photos, videos, archives, or source code files.
Not only you view the desired documents, but you can also edit, convert to other formats or print them.
File Viewer Plus
Use this universal tool to open a corrupt CSV file and retrieve your important data from it before it's too late.
2. Use Unicode UTF-8 encoding
- Open the CSV file.
- Click File, then Save As.
- Enter the file name.
- Select Save as File Type CSV from the drop-down menu.
- Click Tools and go to Web options.
- Go to Encoding under Save this document as.
- Select Unicode (UTF-8)
3. Specific solutions
Foreign characters corrupted or missing: use Google sheets, or Open Office, Libre Office, Notepad++ advance apps to repair the corrupted CSV file.
Error message Line 1 has too many columns…: create a new CSV file with data in 14 columns using Excel, Notepad++ or other apps to recover the CSV data.
Corrupt CSV because of ASCII control, special or extra delimiter characters:
- Delete the spaces at the end of the file
- Fix the extra commas from the corrupted CSV file by deleting extra delimiter characters that separate the handler fields and retrieve the file data
4. Use Notepad or Excel to create a CSV file and repair it
- Enter the text data in a file with each of the fields separated by a comma.
- Separate each row using a new line.
- Save the file using a .csv extension.
Use Excel Spreadsheet
- Enter the data in an Excel spreadsheet.
- Click File.
- Select Save As.
- Choose Save as Type.
- Select CSV (comma delimited).
5. Recover using Autorecover feature
This feature can be found on Excel. Open a spreadsheet and look for the Autorecover window (usually on the left pane of the window). The screen has a list from where you can select the CSV file. It works with unsaved files.
6. Recover using TMP file
- Go to where the Temp file folder is located:
- Search the Excel files with .TMP extension.
- Select the right one by verifying the data.
- Copy and paste or save it to a different destination using .CSV extension.
7. Recover the corrupted CSV file from a previous version
- Go to the corrupted CSV file and right-click on it.
- Select Properties.
- Click Previous Versions.
- Select the last version before saving/replacing.
- Click Restore (ensure restore points are enabled).
So, were you able to find a solution among the ones listed here?
Let us know which one worked for you by leaving a comment in the section below.