CPS Export / Import channels

OE1MWW
Posts: 106
Joined: Sat Oct 17, 2020 2:20 pm
Location: JN88EG
Contact:

Re: CPS Export / Import channels

Post by OE1MWW » Mon Oct 26, 2020 10:32 am

CPS build date 2020.10.25

just simply selecting several channels and exporting them, no change done and 'Import Update/Append' them again will crash CPS.

Tried to import 'Australian_UHF_CB.csv' (as an example). This will go without crash, but several (not all) frequencies are empty,
several frequencies are filled with 564,00000 MHz.

73's de OE1MWW
Wolfgang
Last edited by OE1MWW on Mon Oct 26, 2020 10:43 am, edited 1 time in total.

VK3KYY
Posts: 7486
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: CPS Export / Import channels

Post by VK3KYY » Mon Oct 26, 2020 10:39 am

OE1MWW wrote:
Mon Oct 26, 2020 10:32 am
CPS build date 2020.10.25

just simply selecting several channels and exporting them, no change done and 'Import Update/Append' them again will crash CPS.

Tried to import 'Australian_UHF_CB.csv' (as an example). This will go without crash, but several (not all) frequencies are empty,
several frequencies are filled with 564,00000 MHz.

73's de OE1MWW
Wolfgang
Too late for me to look at this bug now.

I'll look tomorrow morning

G4EML
Posts: 919
Joined: Sat Nov 16, 2019 10:01 am

Re: CPS Export / Import channels

Post by G4EML » Mon Oct 26, 2020 11:41 am

The single quote at the beginning of strings is there to force Excel to always treat the value as a string. If you don’t do this Excel tries to be clever and automatically identify items as numbers or strings. This can cause unwanted changes in the data.

If, for example, you have a CSV with a string value of ‘145.5000’ and you let Excel interpret that as a number you end up with 145.5 in the cell because it removes the trailing zeros.

Whilst this doesn’t matter if the data is truly numeric such as in the frequency columns it causes problems with data that is actually a string such as the channel name or talkgroup name. Names end up getting changed which then causes problems cross referencing.

The codeplug cross references items such as channels or contacts using index numbers to an items position in a list. This causes real problems if any lists are re-ordered. My utilities use the actual names of the items and only recreate the index numbers by searching for matching names when building the final modified codeplug. So it is important the names are not changed unexpectedly by Excel.

Colin G4EML

OE1MWW
Posts: 106
Joined: Sat Oct 17, 2020 2:20 pm
Location: JN88EG
Contact:

Re: CPS Export / Import channels

Post by OE1MWW » Mon Oct 26, 2020 1:40 pm

Right now I do an export >CodePlug to CSV< with the GB3GF utility http://www.gb3gf.co.uk/downloads.html
All csv into a new and empty directory. Important: keep the GB3GF Utility open in the background!
Two small batch files plus the "Find and Replace Text" utility copied into the directory of the csv's.
https://jztkft.dl.sourceforge.net/proje ... _win32.zip
Remark: I bet, the author, as he named his utility, was not very fluent in english at all :-)
Run this next:
- before-excel.cmd -
fart *.csv "," ";"
fart *.csv "." ","
pause
---

This will change the csv separators for the European EXCEL. FYI: The '.' is for the thousand, the ',' is decimal and ';' is column separator.
Don't change the sequence of the commands in the batch files, or you will have a mess.
Now on all .csv files can be worked with EXCEL. If finished, I run another batch:

- after-excel.cmd -
fart *.csv "," "."
fart *.csv ";" ","
pause
---
and finally I create a new CodePlug with the (still open) GB3GF utility.

That's the way I do it, but as said: 'All roads lead to Rome', or YMMV
73's de OE1MWW
Wolfgang

G4EML
Posts: 919
Joined: Sat Nov 16, 2019 10:01 am

Re: CPS Export / Import channels

Post by G4EML » Mon Oct 26, 2020 2:37 pm

I think some of the problems people are having with CSV files is the international differences for numbers. My utilities were originally written for my own use so there is no code to cope with this, it always uses and assumes the UK conventions.

If I get time I may re-visit the code and add some support for . , and ; differences. Maybe just a checkbox to switch between different formats.

There have also been some OpenGD77 features added that are probably not handled correctly in the current version. (power settings?).

I may be able to simplify the structure of the Channels.csv file to only include those features supported by OpenGD77.

As a separate issue I may look to see if I can make it work as a command line file converter. That should then allow it to be called from the CPS or any other program to convert codeplugs to and from CSVs.


Colin G4EML

OE1MWW
Posts: 106
Joined: Sat Oct 17, 2020 2:20 pm
Location: JN88EG
Contact:

Re: CPS Export / Import channels

Post by OE1MWW » Mon Oct 26, 2020 6:15 pm

Most European non-english Windows using the '.' for the thousand, ',' for the decimal separator and ';' is the column separator.
Exported .csv of 'OpenGD77CPS.exe' using the 'international' or 'english' settings for separators, but EXCEL relies on
the national Windows 'separators' settings and can not read the exported .csv properly, column by column.

So, please forget my previous post , using batch files etc.
There is a much simpler way. Included in the zip are two .reg files

natinal.reg: sets the '.' for the thousand, the ',' is the decimal and ';' is the column separator.
internat.reg: sets the ',' for the thousand, the '.' is the decimal and ',' is the column separator.

Double click on the internat.reg file to change the Windows settings for reading the exported .csv with EXCEL
Don't forget to return to your local settings by double click on 'national.reg'.
Just in case, you can have a look into or edit the .reg files with any editor or Windows Notepad.
73's de OE1MWW
Wolfgang
National.InternationalRegistry.zip
(2.09 KiB) Downloaded 101 times

User avatar
Zl1XE
Posts: 110
Joined: Fri Jul 24, 2020 12:25 am

Re: CPS Export / Import channels

Post by Zl1XE » Mon Oct 26, 2020 7:57 pm

Colin, if there is some way I can help with programming this please let me know.

IU8OGE
Posts: 65
Joined: Tue Sep 29, 2020 3:35 pm

Re: CPS Export / Import channels

Post by IU8OGE » Tue Oct 27, 2020 5:32 pm

VK3KYY wrote:
Mon Oct 26, 2020 9:34 am
IU8OGE wrote:
Mon Oct 26, 2020 9:44 am
Also with excel I am changing the column squeltch, Bandwidth all valure to
squeltch = Normal
Bandwidth = 25

than import in cps but when export all value are back to to originale tight and 12,5
I'll log it as a bug.
any update on this ?
thanks

Post Reply