Table of Contents Hide
A comma-separated value or CSV file is used by e-commerce platforms to CRM software to import and export data.
This simple text file format allows anyone to transfer data files. Microsoft Excel users can create and save in several formats. But those with a text editor like Notepad can exchange information too.
This article explains what is a CSV file and the best way to create and read from the comma-separated value format.
Read on to explore the different types of delimiters you can use. Learn how to read thousands of rows in seconds using computer code. Then discover how to save your files for sharing online.
What Is a CSV File?
A CSV file is a simplified spreadsheet.
It contains rows and columns, with each column specifying a particular field like a name or address. Rows display the actual data like John Smith or 123 Street.
The ‘comma separated’ part comes from the comma character being used to separate or delimit each field.
The CSV File Format
CSV files were first introduced in 1972 as a way to transfer data amongst different platforms.
The format soon became popular as it worked regardless of the operating system or hardware. You don’t need specialist software to view or edit the file. Using a text editor like Notepad is fine, although spreadsheet apps like Excel make things easier.
The comma delimiter isn’t the only way to separate a field. Other delimiters include:
- Tab delimiter
- Pipe delimiter
- Double-inverted commas to enclose fields with a comma
Many popular e-commerce platforms like WooCommerce or Shopify export data in the CSV file format. You can edit these files then upload them back into the system to update the main database.
How to Open CSV Files
Opening a CSV file is easy.
Simply double-click the file. If you have Excel or another spreadsheet app, it should automatically display. If not, choose to view the file in Notepad for Windows or TextEdit for macOS.
The real power comes when you use a programming language.
The .NET C# read CSV library tools take the hassle out of writing code from scratch. Import the library, select the CSV file path, then map each field and you’re good to go.
Creating a CSV File
These powerful C# libraries also let you create a CSV file. You can then share them via email, FTP, or use a web service to import your content.
Non-developers can use Excel to create a CSV file.
Excel offers several different formats like:
- CSV UTF-8
- CSV (Comma delimited)
- CSV for Macintosh
- CSV for MS-DOS
Other spreadsheet programs let you choose a tab-delimited style which is often more portable. Make sure to select UTF-8 as the code format to include non-ASCII characters. This means your files will work everywhere!
More Excel Tips and Tricks
A CSV file is one of the most basic data file formats and it’s still popular today.
You can create a CSV file using Excel, Google Sheets, or any number of editors. Use programming languages like C# to read rows quickly. Then you can import that information into your databases or forward the data in an email.
Learn more about the CSV file format and Excel on our website. Our posts include Excel tips and tricks so remember to bookmark the site.