Project

General

Profile

CSV HowTo » History » Version 11

Daniel Clemmensen, 03/14/2019 11:55 AM
cp

1 8 Dan Smith
h1. How to use CSV files
2
3 7 Dan Smith
{{>toc}}
4 1 Dan Smith
5
6
h2. Introduction
7
8
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
10
h2. A Clean Start
11
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 4 Dan Smith
# Start CHIRP
15
# Go to *File* > *New* to create an empty CSV file
16
# Add a memory to the first row, by entering a frequency such as *146.52*
17
# Go to *File* > *Save As* to save the template file to something ending with a *.csv* extension
18
# Open the file in your spreadsheet or external application of choice, make edits and save
19
# Re-open the file in CHIRP to validate that the format is still correct, by going to *File* > *Open* and choosing your file
20
# Optionally use *File* > *Import* to import the contents of your CSV file into another radio image
21 2 Dan Smith
22
h2. Tips To Avoid Breaking The Formatting
23
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 4 Dan Smith
# You must maintain the header row in its original format so that CHIRP knows which column corresponds to which value
27
# You may re-order the columns as long as the header row matches
28
# You may delete columns for which there are sane defaults and CHIRP will assume those defaults upon opening or importing the file
29
# You may place double quote marks (i.e. " not ' or '') around column values that contain spaces or commas
30
# 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.
31 6 Dan Smith
32
h2. Getting The Data Back Into A Radio
33
34
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 go through some sort of an _Import_ operation. There are two basic ways to do this, depending on what you are trying to accomplish:
35
36
h3. Method !#1: Importing the CSV file into a radio
37
38
This method should be used when you want to import the entire contents (or some large portion) of the CSV file into the destination radio. Follow these steps:
39
40
# Open a *.img* file of your radio, or download one from it using *Radio* > *Download From Radio*. Make sure that the 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.
41
# Go to *File* > *Import from file* and choose your CSV file.
42
# An import dialog box will appear, which lets you preview the memories that can and will be imported. Make your selections or corrections, if necessary, and then click *OK*.
43
# The memories stored in the CSV file should now be visible in your editor.
44 9 Daniel Clemmensen
# make any modification needed for your radio here. The CSV file is generic and does not have all of the columns your radio may need. See below.
45 6 Dan Smith
# 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.
46
47
h3. Method !#2: Manually copying memories into a radio
48
49
This method should be used when you want selectively import a few memories from a CSV file into the destination radio. Follow these steps:
50
51
# Open your CSV file using *File* > *Open* and choosing your file.
52
# 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.
53
# 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.
54
# After selecting one or more memories, copy them to the clipboard by going to *Edit* > *Copy*.
55
# Next, select the tab corresponding to your actual radio at the top
56
# Select a spot in the radio's memory to paste the new memories and then go to *Edit* > *Paste*.
57
# 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.
58 10 Daniel Clemmensen
59
h2. Handling missing columns
60
61
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.
62 11 Daniel Clemmensen
After you import the spreadsheet into 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:
63
* Select relevant rows:
64
** Click on the first row
65
** Move to the last affected row and shift-click
66
* Right-click to get the convenience popup, and click on "properties" to bring up the properties menu
67
* Select the property ("column") checkbox to change and select the new value for it from its dropdown (e.g., select "power" and select "high").
68
* Click OK.