Converting files into CSV format
Ori Sagi avatar
Written by Ori Sagi
Updated over a week ago

Pecan supports the ability to upload local CSV files to the platform, instead of creating a data connection.

If you want to upload tables but they’re in a different format, you can easily convert them into CSVs by using a range of applications. This article provides basic guidance on how to do so using Microsoft Excel.

When preparing CSV tables to be uploaded to the platform, you should be aware of Pecan’s formatting requirements.

How to convert a file using Microsoft Excel

For demonstrative purposes, we'll use the example of converting a TSV (tab-separated value) file into CSV format using Microsoft Excel.

Here is a small sample of a TSV file, where the columns are separated by a tab (/t) character:

id	username	purchase	install_time
1	abickford0	24.52	2/5/2022
2	shalewood1	23.4	1/14/2022
3	hthys2	15.82	7/1/2022
4	gelfleet3	68.06	5/3/2022
5	eflicker4	   	12/8/2022
6	rspendley5	89.67	8/22/2022
7	gguymer6	81.7	9/29/2022
8	 	23.84	8/17/2022
9	pdood8	67.46	4/4/2022

Notice that Rows 6 and 9 contain null values. Also, the “install_time” column is of date type, but not in a format supported by Pecan.

To convert the above table into CSV format, follow these steps:

  1. Open the file in Microsoft Excel.

  2. Since the file is in TSV format, an import wizard will appear and help you define its structure.

    In Step 2 of 3, select “Tab” as the delimiter.

    In Step 3, ensure the data format for the “install_time” column is mapped to “Date”->”MDY”

  3. Once the file has loaded, select the “install_time” column, right-click, and select Format Cells.

  4. In the window that appears, under the “Number” tab, select the “Date” category, and then select the date format supported by Pecan.

  5. Take a look to ensure the date column (“install_time”) appears as expected.

  6. Open the "File" menu and use the “Save as” dropdown to save the document in CSV format.

Your table will now be saved as a CSV file, which you can then upload to Pecan.

Note: Null values are represented as empty strings, so there's no need to align them with Pecan’s CSV formatting requirements.

Did this answer your question?