Home > Net >  Does a single column CSV file have commas?
Does a single column CSV file have commas?

Time:08-17

When i open my csv file in an excel it looks like this - Header Value1 Value2 Value3 Value4 Value5

I want to know whether this file actually has commas in it? I am aware that if i have multiple columns i will see the commas

CodePudding user response:

You can easily test that by opening the file in a text editor (e.g. Notepad on Windows). It will show the file as it is in text format, i.e., with commas present (if they are in the file). I would say that if it is single column, it won't have commas (but rather line breaks between the rows), but if you need to be sure just open it with a text editor.

CodePudding user response:

https://www.ietf.org/rfc/rfc4180.txt

Given there is only one value in each record it would not have a comma given the spec.

  1. Within the header and each record, there may be one or more fields, separated by commas. Each line should contain the same number of fields throughout the file. Spaces are considered part of a field and should not be ignored. The last field in the record must not be followed by a comma. For example:
  • Related