Skip to main content
All CollectionsCSV files
What is a CSV file and how to edit it
What is a CSV file and how to edit it
Diego Lorenzetti avatar
Written by Diego Lorenzetti
Updated over a week ago

A CSV (Comma Separated Values) file is a type of text file used to represent tables in a simple and readable format.

Its structure is straightforward: the data is organized in rows and columns, where the values of each column are separated by a delimiter character, often a comma or a semicolon.

The CSV file includes a header row, which describes the column names to make the data more understandable.

Here's an example of what a CSV file looks like:

Name,LastName,Age,City
Marco,Rossi,30,Rome
Anna,Verdi,25,Milan
Luca,Bianchi,40,Turin

In this example, we have a table with four columns: Name, Last Name, Age, and City.

Each row represents the data of a person. The values of each column are separated by commas. So, the name is "Marco," the last name is "Rossi," the age is "30," and the city is "Rome."

Usage of Quotation Marks

In some cases, especially when you want to enter a numeric value in the thousands (and therefore with a comma, for example, 1,250), you will need to use quotation marks to avoid confusing the software that reads the CSV file. Without the quotation marks, the software might interpret the decimal comma as a column separator.

So, to insert a decimal value with a comma, instead of simply writing:

1,250

the correct way would be to write "1,250".

Here's an example of the CSV format:

Name,LastName,Age,MonthlySalary
Marco,Rossi,30,"1,550"
Anna,Verdi,25,999
Luca,Bianchi,40,"3,425"

In this example, for rows 1 and 3, since there are values in thousands in the column "MonthlySalary," the amounts are enclosed in quotation marks "", unlike row 2, which having a value not in the thousands , can be filled with an amount without any quotation marks.

Empty Fields

CSV files have some columns that are mandatory to fill, while others are optional, and therefore, they can be left empty.

In this case, you still need to insert a comma as a separator to let the software know that you have left the cell related to an optional column empty and that you are moving to the next cell.

Here's an example of what a CSV file looks like with the "Age" column being optional:

Name,LastName,Age,City
Marco,Rossi,,Rome
Anna,Verdi,25,Milan
Luca,Bianchi,,Turin

In this example, rows 1 and 3 do not have the "Age" value, which is optional. However, an additional comma is added to indicate the empty "Age" cell. Row 2, on the other hand, includes the "Age" value and follows the normal format.

How to edit a CSV file in CryptoBooks format using a text editor

  1. Download the CSV file from this link, which already contains the required header row in the CryptoBooks format.

  2. Open the file with the text editing software on your computer (for Mac users, it's called TextEdit, and for Windows users, it's called Notepad). Here's how the pre-filled CSV file with the header row looks:

    Please note: Keep the header row enclosed in "quotation marks" to prevent the software from interpreting spaces between words as column separators.

  3. Press Enter to move the cursor to a new line.

  4. Fill in the necessary values following the instructions provided in this article:

  5. Once you have entered all the rows you want to import, save the file.

Here's the video tutorial

How to edit a CSV file in CryptoBooks format using Excel

  1. Download the CSV file from this link, which already contains the required header row in the CryptoBooks format.

  2. Open the file with Microsoft Excel.

    Here's how the pre-filled CSV file with the header row looks:

  3. Click on column A to select the entire column.

  4. On the navigation menu, click on "Data."

  5. Click on "Text to Columns."

  6. Select "Delimited" and then click "Next."

  7. Choose "Comma" and click "Next."

  8. Click "Finish."

  9. Now your header row will be displayed like this:

  10. Go to cell A2 and fill in the necessary values following the instructions provided in this article:

  11. Once you have entered all the rows you want to import, save the file following these steps:

    1. Click on "File."

    2. Click on "Save As."

    3. Select the folder to save the file.

    4. Make sure the selected file type is "CSV (Comma Delimited)."

    5. Click "Save."

Here's the video tutorial

!Possible Issue with Excel!

Sometimes, it may happen that when creating and editing a CSV file with Excel, automatic changes are made that invalidate the file and prevent its uploading.

In those cases, the user will need to check and correct the file using a text editor software.

Here is an example of incorrect formatting:

File compiled and displayed correctly using Excel


Same file opened with a text editor software

In this image, it can be observed that some quotation marks have been mistakenly added, both in the header and in the first two rows.


โ€‹

Did this answer your question?