Blank Entries After Uploading CSV

Problem

I uploaded a CSV for my Flex AppBlock, and I see all my entries, but there are also a few more blank entries.  What is going on?

 

Solution

The issue most likely has to do with Excel.  You may have deleted some items from your CSV in Excel, and the specific way in which you deleted them impacts the CSV.

If you highlight the cells of the undesired rows and hit Delete, it looks like the rows are gone, but they are technically still there - they just happen to be empty in every column.  If you upload that CSV, the platform will see these empty rows and create entries with blank values for every field.

If you highlight the rows themselves, then delete them, the rows will be fully gone.  If you upload that CSV, you will not have any blank entries.

 

For example, let's say you have a CSV with 5 entries: (download here)

 

Let's say you want to delete the fifth row (Thomas Hughes).  You select all the fields in that row and hit Delete.

It looks like the row has been deleted, so you save it as a new CSV file.  If you were to open the file in a text editor, such as Notepad++, you would see that the last row is still there, with only commas remaining:

 

If you upload this CSV into the platform, it will treat the final row as another entry:

 

You can easily delete this blank entry from AppOffice, but you can avoid it altogether by deleting the entire row in Excel.  To do that, select the entire row (click on the number to the left of the first column), right-click, and select Delete:

This time, the row has actually been deleted, and you save it as a new CSV file.  If you were to open the file in a text editor, such as Notepad++, you would see that the last row is not there:

 

If you upload this CSV into the platform, it will create 4 entries, as expected: