开云体育

LogixNG table editor and CSV question #logixng


 

Following this JMRI tutorial I try to make up and import as a LogixNG table this Excell .csv file. Simply 8 sensors (C2S0B1 ... C2S0B8) and three lamps (C2L0B001 .. C2L0B003).
Excel view:
?
And LogxNG view of the imported csv file:
?
What is wrong with my import? I cannot seem to use it anywhere as described in the JMRI tutorial ()... ? Wrong csv table? Wrong way of importing?
?
The csv file as used is attached below.
Thanks for any help or pointers!
Erik
?


 

开云体育

Erik,

Your CSV file uses semicolon as separator. Try to export the table using TAB as the separator instead.

Daniel

On 2025-05-25 13:53, Erik84750 via groups.io wrote:

Following this JMRI tutorial I try to make up and import as a LogixNG table this Excell .csv file. Simply 8 sensors (C2S0B1 ... C2S0B8) and three lamps (C2L0B001 .. C2L0B003).
Excel view:
?
And LogxNG view of the imported csv file:
?
What is wrong with my import? I cannot seem to use it anywhere as described in the JMRI tutorial ()... ? Wrong csv table? Wrong way of importing?
?
The csv file as used is attached below.
Thanks for any help or pointers!
Erik
?


 

I do not how to use a tab separator within an Excel cell? Can you please explain?
?
So I took what probably is the long route:
1. open turbopad (or some text editor), wrote for each line, separated by a tab, the various items per line (sequence number (8), systemname for inputs (8), systemname for turnout (3) and saved as .csv (ignoring whatever warnings appear)
2. open LogixNG Tables, "add tables", select the newly created .csv file (saved as a .txt file), option "tabs separated" and I got this:
?
...but this is cumbersome: all that text editing takes too long when compared to a simple Excell worksheet.
?
Is there a proper way to enter data in an Excell sheet and get it exported properly so tha MogixNG Tables recognizes it as a proper .csv file?
?


 

This time differently:
?
1. open Excell, and row 1 needs to contain the headers ("input", "output", ..)
2. rows 2 etc.. : per column enter the appropriate data (systemnames for inputs, outputs, ..
3. save as MS-DOS .txt file (ignore warnings)
4. import as this .txt file in the LogixNG Tables window (use Tabs-separated option5
5. bingo
?
Maybe the JMRI help- and tutorial pages need a little more explanation on this subject?


 

When you do the Excel CSV export, specify comma for the separator. ?It looks like you used the semi-colon in the first export. ?

When you do the LogixNG import, select the proper separator.
Dave Sand




----- Original message -----
From: "Erik84750 via groups.io" <e.arckens=[email protected]>
Subject: Re: [jmriusers] LogixNG table editor and CSV question
Date: Sunday, May 25, 2025 9:42 AM

This time differently:
?
1. open Excell, and row 1 needs to contain the headers ("input", "output", ..)
2. rows 2 etc.. : per column enter the appropriate data (systemnames for inputs, outputs, ..
3. save as MS-DOS .txt file (ignore warnings)
4. import as this .txt file in the LogixNG Tables window (use Tabs-separated option5
5. bingo

?
Maybe the JMRI help- and tutorial pages need a little more explanation on this subject?


 

@ Dave Sand : Should I export the Excell file as a CSV file? I save the Excell file as a text file, and then import in LogixNG Tables as a .txt file (with tab separations.
?
What is "the correct" way?


 

There is no "correct" way. ?Whatever works is good enough.

I create the table using a spreadsheet, in my case Apple Numbers. ?That is saved as the master version. ?The spreadsheet export CSV option is used to create the comma separated CSV file. ?This is loaded using the "LogixNG Table" table with the comma option. ?

If changes are needed, I stop PanelPro. ?The spreadsheet is updated and exported as an updated CSV file. ?Then I start PanelPro and the new CSV data will be loaded. ?Note: ?Once the table definition has been added to the LogixNG Table, subsequent xml data file loading will load the current CSV file. ?The table content is not stored in the layout data xml file. ?A reference to the CSV file name is stored.

Dave Sand


----- Original message -----
From: "Erik84750 via groups.io" <e.arckens=[email protected]>
Subject: Re: [jmriusers] LogixNG table editor and CSV question
Date: Sunday, May 25, 2025 1:59 PM

@ Dave Sand : Should I export the Excell file as a CSV file? I save the Excell file as a text file, and then import in LogixNG Tables as a .txt file (with tab separations.
?
What is "the correct" way?


 

Thank you Dave! That information is what?I need, it puts the whole thing in a broader perspective.


 

On Sun, May 25, 2025 at 09:59 PM, Dave Sand wrote:
Then I start PanelPro and the new CSV data will be loaded. ?Note: ?Once the table definition has been added to the LogixNG Table, subsequent xml data file loading will load the current CSV file. ?The table content is not stored in the layout data xml file. ?A reference to the CSV file name is stored.
?
?
If I understand coorectly, every time Panel Pro is started, and the relevant .xml file is loaded, and there is a valid LogixNG Tables file, this file will load its source csv file including any modifications made prior to loading?


 

If the xml file has a reference to the CSV file, the current data will be loaded from the CSV file.

Dave Sand



----- Original message -----
From: "Erik84750 via groups.io" <e.arckens=[email protected]>
Subject: Re: [jmriusers] LogixNG table editor and CSV question
Date: Sunday, May 25, 2025 3:28 PM

On Sun, May 25, 2025 at 09:59 PM, Dave Sand wrote:
Then I start PanelPro and the new CSV data will be loaded. ?Note: ?Once the table definition has been added to the LogixNG Table, subsequent xml data file loading will load the current CSV file. ?The table content is not stored in the layout data xml file. ?A reference to the CSV file name is stored.
?
?
If I understand coorectly, every time Panel Pro is started, and the relevant .xml file is loaded, and there is a valid LogixNG Tables file, this file will load its source csv file including any modifications made prior to loading?


 

On Sun, May 25, 2025 at 03:15 PM, danielb987 wrote:

Erik,

Your CSV file uses semicolon as separator. Try to export the table using TAB as the separator instead.

Daniel

Hi Dani?l, I have one last question:
?
I cannot so far seem to save an Excel file as a .csv file useable for LogixNG Tables. At the moment I need to convert my Excel file to an MS-DOS .txt file but that makes the original Excel file disappear into this .txt file.
?
One issue I discovered () is that we in the EU use a comma for decimal and a . (dot) for thousands: this makes Excel to convert .csv to ; (semicolon) delimited files.
?
It would be a huge advantage for JMRI to also allow a semicolon as separator in the options (besides tbas and comma). Where can I contact JMRI developper to request this addition?


 

On Sun, May 25, 2025 at 05:04 PM, Dave Sand wrote:
When you do the Excel CSV export, specify comma for the separator. ?It looks like you used the semi-colon in the first export. ?
?
When you do the LogixNG import, select the proper separator.
Dave Sand
?
Hi Dave, I discovered why my .csv file uses a semi-colon. Please see my previous message.
?
The only solution (in light of what I described there) is for JMRI to allow a third option (besides tab and comma) namely a semi-colon.
I intend on submitting this request to the developpers.
?
Erik
?


 

Erik,

Does Excel have an option to export using tabs?

Dave Sand


----- Original message -----
From: "Erik84750 via groups.io" <e.arckens=[email protected]>
Subject: Re: [jmriusers] LogixNG table editor and CSV question
Date: Monday, May 26, 2025 1:32 AM

On Sun, May 25, 2025 at 05:04 PM, Dave Sand wrote:
When you do the Excel CSV export, specify comma for the separator. ?It looks like you used the semi-colon in the first export. ?
?
When you do the LogixNG import, select the proper separator.

Dave Sand
?
Hi Dave, I discovered why my .csv file uses a semi-colon. Please see my previous message.
?
The only solution (in light of what I described there) is for JMRI to allow a third option (besides tab and comma) namely a semi-colon.
I intend on submitting this request to the developpers.
?
Erik
?


 

开云体育

Erik,

Which version of Excel do you have? I have Excel 2010 and it supports export to TAB separated CSV file.

See this documentation for Microsoft 365, Excel 2024, Excel 2021 and older versions.

Daniel


On 2025-05-26 08:32, Erik84750 via groups.io wrote:

On Sun, May 25, 2025 at 05:04 PM, Dave Sand wrote:
When you do the Excel CSV export, specify comma for the separator. ?It looks like you used the semi-colon in the first export. ?
?
When you do the LogixNG import, select the proper separator.
Dave Sand
?
Hi Dave, I discovered why my .csv file uses a semi-colon. Please see my previous message.
?
The only solution (in light of what I described there) is for JMRI to allow a third option (besides tab and comma) namely a semi-colon.
I intend on submitting this request to the developpers.
?
Erik
?


 

On Mon, May 26, 2025 at 06:59 PM, danielb987 wrote:

Erik,

Which version of Excel do you have? I have Excel 2010 and it supports export to TAB separated CSV file

I have MS Office 2010.
Two versions of export to .csv are presented when using "save as":
1. CSV (MS-DOS) *.csv
2. CSV separated by list-separation sign *.csv
?
In both cases the exported .csv file uses semi-colon (";"), as described in my previous message. Summary: due to the fact that EU decimal (,) and thousands (.) separation is different from US separation, a semi-colon is used as record separation.
If I want to use tab-separated records I have to export as "Text (tab separated) *.txt".
Causing my file to loose any Excel link.
?
Hence my upcoming request to have this third option when retrieving .csv files, (besides "tab" and "comma" separation) for "semi-colon" separation.


 

On Mon, May 26, 2025 at 03:35 PM, Dave Sand wrote:
Erik,
?
Does Excel have an option to export using tabs?
?
Dave Sand
?
Yes, but resulting in a .txt file.


 

Erik,

Try renaming the .txt file as .csv.

Dave Sand


----- Original message -----
From: "Erik84750 via groups.io" <e.arckens=[email protected]>
Subject: Re: [jmriusers] LogixNG table editor and CSV question
Date: Monday, May 26, 2025 1:10 PM

On Mon, May 26, 2025 at 03:35 PM, Dave Sand wrote:
Erik,
?
Does Excel have an option to export using tabs?
?
Dave Sand
?
Yes, but resulting in a .txt file.


 

Erik,
Try renaming the .txt file as .csv.
Dave Sand
?
That results in a Excel file with one column and all records (all columns) compressed together per row, hence useless.


 

开云体育

Erik,

Please attach the file you get when you export the Excel document using TAB.

Which version of Excel do you use? Do you use Windows och Mac?

Daniel


On 2025-05-26 21:45, Erik84750 via groups.io wrote:

Erik,
Try renaming the .txt file as .csv.
Dave Sand
?
That results in a Excel file with one column and all records (all columns) compressed together per row, hence useless.


 

开云体育

Erik,

Forgot this mail. I missed that you have already answered my other email.

Daniel

On 2025-05-27 00:18, danielb987 wrote:

Erik,

Please attach the file you get when you export the Excel document using TAB.

Which version of Excel do you use? Do you use Windows och Mac?

Daniel


On 2025-05-26 21:45, Erik84750 via groups.io wrote:
Erik,
Try renaming the .txt file as .csv.
Dave Sand
?
That results in a Excel file with one column and all records (all columns) compressed together per row, hence useless.