How to Make a Header Row in a CSV File
Comma Separated Value, or CSV, files are simply text files in which items are separated by commas and line breaks. If you open a CSV file with a spreadsheet program, each item is listed in a single cell across a row, and when the CSV file reaches the end of a line, the spreadsheet program places the items after that into the next row. If your CSV file doesn't have headers, you can add them by simply creating a new first line in the text file and typing in your headers.
Right-click on the icon for the CSV file, and move your mouse up to "Open With."
Select Wordpad or Notepad from the list. Wordpad may be a bit easier to use, but both will get the job done.
Click anywhere in the text that opens up, and press "Ctrl+Home" to move the cursor to the first space in the text box.
Press the "Enter" key to create a new first line, and press the up arrow to move the cursor to the first line.
Type the name of the first field that you want in the header row, which will appear as the first entry above a column in a spreadsheet program. Then place a comma directly after the end of the word. Immediately type the name of the second field that you want to add to the header row, and place a comma directly after that. Continue until you have named each column.
Click on "File" at the top of the window, and choose "Save" from the drop-down menu. You CSV file now has a header row.
Tips & Warnings
- If your entry includes a comma, surround the entire entry in double quote marks.
- Don't add spaces before or after commas unless you want the space to come before or after the item in a spreadsheet program.