Project

General

Profile

CSV HowTo » History » Version 15

Dan Smith, 04/14/2024 05:49 PM

1 13 Dan Smith
# How to use CSV files
2 8 Dan Smith
3 7 Dan Smith
{{>toc}}
4 1 Dan Smith
5
6 13 Dan Smith
## Introduction
7 1 Dan Smith
8 15 Dan Smith
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.
9 1 Dan Smith
10 13 Dan Smith
# A Clean Start
11 1 Dan Smith
12
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:
13 5 Dan Smith
14 13 Dan Smith
1. Start CHIRP
15
1. Go to *File* > *New* to create an empty CSV file
16 15 Dan Smith
1. Add a memory to the first row, by entering a frequency such as `146.52`
17
1. Go to *File* > *Export to CSV* to save the template file to something ending with a `.csv` extension
18 13 Dan Smith
1. Open the file in your spreadsheet or external application of choice, make edits and save
19
1. Re-open the file in CHIRP to validate that the format is still correct, by going to *File* > *Open* and choosing your file
20 14 Dan Smith
1. Optionally copy memories from that tab into the tab for another radio
21 2 Dan Smith
22 13 Dan Smith
## Tips To Avoid Breaking The Formatting
23 2 Dan Smith
24
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:
25 5 Dan Smith
26 13 Dan Smith
1. You must maintain the header row in its original format so that CHIRP knows which column corresponds to which value
27 15 Dan Smith
1. You may re-order the columns as long as the header row matches. **NOTE:** The `Location` column must always be the first one.
28 14 Dan Smith
1. You may delete columns for which there are sane defaults and CHIRP will assume those defaults upon opening the file
29 13 Dan Smith
1. You may place double quote marks (i.e. " not ' or '') around column values that contain spaces or commas
30 15 Dan Smith
1. 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 Tone (mode) 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.
31 6 Dan Smith
32 13 Dan Smith
## Getting The Data Back Into A Radio
33
34 14 Dan Smith
CSV files are generic, radio-independent text files. This means that you cannot upload them directly into a radio. In order to get the information into your device, you must copy memories into an image for that device:
35 6 Dan Smith
36
1. Open your CSV file using *File* > *Open* and choosing your file.
37 13 Dan Smith
1. Open a *.img* file of your radio, or download one from it using *Radio* > *Download From Radio*. Make sure that the resulting tab at the top says something like "Yaesu FT-7800" or "Icom IC-880" to indicate that you're operating on a radio-specific driver.
38
1. Select the tab containing your CSV file at the top, and select memories from the CSV file you want to copy over. You can select multiple rows by holding the _Shift_ or _Control_ keys while making your selections.
39
1. After selecting one or more memories, copy them to the clipboard by going to *Edit* > *Copy*.
40
1. Next, select the tab corresponding to your actual radio at the top
41
1. Select a spot in the radio's memory to paste the new memories and then go to *Edit* > *Paste*.
42
1. If you have a clone-mode radio, upload the changes back to your device using *Radio* > *Upload To Radio*. If you are using a live-mode radio, wait until all of the changes finish synchronizing back to the device by watching the status bar in the lower right corner of the main window.
43
44
## Handling missing columns
45 10 Daniel Clemmensen
46
Since the CSV files are generic your radio may need information that is not present in the CSV file. The most frequent example of this is the missing "Power" column. If your radio's "power" defaults to "low" then you probably want to change the setting to "high" for all channels.
47 14 Dan Smith
After you open the spreadsheet in the CHIRP window for your radio, you will need to change setting in the "power" column for all rows. Fortunately, CHIRP has a shortcut that lets you change one or more columns in all rows:
48 13 Dan Smith
1. Select relevant rows:
49
 1. Click on the first row
50
 1. Move to the last affected row and shift-click
51
1. Right-click to get the convenience popup, and click on "properties" to bring up the properties menu
52
1. Select the property ("column") checkbox to change and select the new value for it from its dropdown (e.g., select "power" and select "high").
53
1. Click OK.