Project

General

Profile

CSV HowTo » History » Version 2

Dan Smith, 05/04/2012 07:30 AM

1 1 Dan Smith
h1. How to use CSV files
2
3
h2. Introduction
4
5
It is important to note that CSV stands for "Comma Separated Values" and is a method of _encoding_ and not a strict file format. Any kind of record data can be stored in a CSV file, which is why spreadsheet applications such as Microsoft Excel and LibreOffice Calc support it. If you create a CSV file without a specific format, CHIRP will not be able to extract the needed data from it,
6
7
h2. A Clean Start
8
9
If you want to get an empty CHIRP-compatible CSV file, the easiest way is to let CHIRP create one for you. Here are the approximate steps for creating an empty file, editing it in an external editor and opening it back up in CHIRP:
10
1. Start CHIRP
11
2. Go to *File* > *New* to create an empty CSV file
12
3. Add a memory to the first row, by entering a frequency such as *146.52*
13
4. Go to *File* > *Save As* to save the template file to something ending with a *.csv* extension
14
5. Open the file in your spreadsheet or external application of choice, make edits and save
15
6. Re-open the file in CHIRP to validate that the format is still correct, by going to *File* > *Open* and choosing your file
16
7. Optionally use *File* > *Import* to import the contents of your CSV file into another radio image
17 2 Dan Smith
18
h2. Tips To Avoid Breaking The Formatting
19
20
CHIRP relies on the CSV file's formatting to be intact in order for it to read and understand the data inside the file. Observe the following rules to ensure that CHIRP can continue to read the file:
21
1. You must maintain the header row in its original format so that CHIRP knows which column corresponds to which value
22
2. You may re-order the columns as long as the header row matches
23
3. You may delete columns for which there are sane defaults and CHIRP will assume those defaults upon opening or importing the file
24
4. You may place double quote marks (i.e. " not ' or '') around column values that contain spaces or commas
25
5. Field values must be in the original format and one of the accepted values for the column type. For example, the Duplex field may be either blank, an plus sign (+), a minus sign (-), or the word "split". The ToneMode field may be either blank, the words "Tone", "TSQL", "DTCS", or "Cross", and so on. If there is ever a question, use CHIRP to create a file with a given value and observe what it puts into the CSV file as a result.