CSV viewer editor transformer

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: petermad, Stefan2, Hacker

adoeller
Senior Member
Senior Member
Posts: 401
Joined: 2011-05-23, 09:47 UTC

CSV viewer editor transformer

Post by *adoeller »

https://github.com/adoeller/tc-csvtab2

### ✏️ Edit mode

Edit cell values directly in the grid and write the result back to the source file,
preserving its original encoding and delimiter.

* Toggle edit mode with **Ctrl+E** (or **Ctrl+R**), via the right-click menu, or the
status bar.
* Start editing a cell with **F2** or by **double-clicking** it.
* **Enter accepts the change, **Esc** cancels it.
* Delete whole rows with **Ctrl+X** or the right-click menu (*Delete row(s)*). The
selected rows are removed; with no selection the row under the cursor is deleted.
* **Ctrl+S** saves the file. Saving is **atomic** (write-to-temp + replace) so a failed
write never corrupts the original file. Encoding, delimiter and comment handling are
preserved on save.
* The status bar shows the current state: `EDIT`, `EDIT *` (unsaved edit) or `MODIFIED *`.
* If you close the viewer or reload the document with unsaved changes, you are asked
whether to save first.

### 🔧 Transform mode (column workbench)

A side panel for reshaping the table without touching the source file, with a **live
preview** directly in the grid.

Toggle transform mode with **Ctrl+T**, via the right-click menu, or the status bar.

The sidebar groups the actions by purpose (each group is colour-coded):

| Group | Actions | Description |
|-------|---------|-------------|
| **Ordering | Up / Down | Move the selected column |
| **Columns | Add / Remove / Rename | Add new (virtual) columns, drop or rename existing ones. *Add* accepts several names separated by `;` |
| **Cell values** | Set all cells / Fill empty cells / Enumerate cells | Set a constant value, fill only the empty cells, or number rows over a `start:stop` range |
| **Load / Save** | Load / Save transformation | Persist the whole transformation as a JSON file and reload it later |
| **Export | Export CSV / Delimiter / Number format | Write the transformed table to a new CSV; choose the export delimiter (`;` `,` TAB) and number format (keep `original`, force `.` or force `,`) |
| **Apply | Apply to grid | Render the transformation live in the grid; the button turns into *Reset grid view* |

* The input field uses a placeholder hint (*"Value / name / enumeration start:stop"*).
* **Apply to grid** shows the transformed columns, headers and values in the grid itself
(read-only preview). The status bar shows a `TRANSFORM` indicator. Press the button
again (now *Reset grid view*) to return to the normal view. The source data is never
modified by the preview.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7575
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: CSV viewer editor transformer

Post by *Horst.Epp »

Thanks, looks very useful.
Will try it
Windows 11 Home, Version 25H2 (OS Build 26200.8875)
TC 11.58 x64 / x86
Everything 1.5.0.1416b (x64), Everything Toolbar 2.4.1
QAP 12.3 x64, Listary Pro 7.0.0.3 beta
User avatar
KozakMak
Power Member
Power Member
Posts: 741
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: CSV viewer editor transformer

Post by *KozakMak »

2adoeller
I changed delimiter and\or comments from status bar - why aren't they remembered? Neither in the current session nor in ini.
OS: Win11 | TC: latest x64
User avatar
Matthias030
Senior Member
Senior Member
Posts: 427
Joined: 2007-03-04, 10:48 UTC
Location: Berlin

Re: CSV viewer editor transformer

Post by *Matthias030 »

Good rework of the good old CSVView Plugin. Thanks for that!
One little issue - if I change the column width with mouse, the view is only updating after clicking into the the window.
Another wish: Maybe we can configure in the INI file which editor mode to start: Default Mode, Editor Mode, Transformer Mode
adoeller
Senior Member
Senior Member
Posts: 401
Joined: 2011-05-23, 09:47 UTC

Re: CSV viewer editor transformer

Post by *adoeller »

KozakMak wrote: 2026-06-13, 14:23 UTC 2adoeller
I changed delimiter and\or comments from status bar - why aren't they remembered? Neither in the current session nor in ini.
its automatically detected, this is only for manual override on a per file basis.
separator configured in ini is used for copied content mostly.

or you use either

Code: Select all

default-column-delimiter=;
default-column-delimiter=";"
notice the ; after the = without space

are you having problems with parsing csv?
adoeller
Senior Member
Senior Member
Posts: 401
Joined: 2011-05-23, 09:47 UTC

Re: CSV viewer editor transformer

Post by *adoeller »

Matthias030 wrote: 2026-06-13, 14:50 UTC Good rework of the good old CSVView Plugin. Thanks for that!
One little issue - if I change the column width with mouse, the view is only updating after clicking into the the window.
Another wish: Maybe we can configure in the INI file which editor mode to start: Default Mode, Editor Mode, Transformer Mode
nice ideas. implemented in next release.
adoeller
Senior Member
Senior Member
Posts: 401
Joined: 2011-05-23, 09:47 UTC

Re: CSV viewer editor transformer

Post by *adoeller »

adoeller wrote: 2026-06-13, 15:09 UTC
KozakMak wrote: 2026-06-13, 14:23 UTC 2adoeller
I changed delimiter and\or comments from status bar - why aren't they remembered? Neither in the current session nor in ini.
its automatically detected, this is only for manual override on a per file basis.
separator configured in ini is used for copied content mostly.

or you use either

Code: Select all

default-column-delimiter=;
default-column-delimiter=";"
notice the ; after the = without space

are you having problems with parsing csv? commets in the firsts lines will be skipped for delimiter determination
adoeller
Senior Member
Senior Member
Posts: 401
Joined: 2011-05-23, 09:47 UTC

Re: CSV viewer editor transformer

Post by *adoeller »

new version on github

fixes
added default start mode
added better comment skipping and skipping of empty lines
added better separator recognition

decimal-align Align decimals per column and right-align integers (0/1, default 1)
Last edited by adoeller on 2026-06-13, 18:34 UTC, edited 1 time in total.
adoeller
Senior Member
Senior Member
Posts: 401
Joined: 2011-05-23, 09:47 UTC

Re: CSV viewer editor transformer

Post by *adoeller »

Matthias030 wrote: 2026-06-13, 14:50 UTC Good rework of the good old CSVView Plugin. Thanks for that!
i also made the xml and json rework including edit. on my github page.
User avatar
KozakMak
Power Member
Power Member
Posts: 741
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: CSV viewer editor transformer

Post by *KozakMak »

= How about smart (auto) comments? If the first line of the file starts with the # character = hidden ? example

= And pls add entry "resize columns". After I changed comments mode - the columns all become the same width :(

= What is the default detect string? "MULTIMEDIA & (ext="CSV" | ext="TAB" | ext="TSV")" ?
OS: Win11 | TC: latest x64
User avatar
Matthias030
Senior Member
Senior Member
Posts: 427
Joined: 2007-03-04, 10:48 UTC
Location: Berlin

Re: CSV viewer editor transformer

Post by *Matthias030 »

adoeller wrote: 2026-06-13, 17:19 UTC
Matthias030 wrote: 2026-06-13, 14:50 UTC Good rework of the good old CSVView Plugin. Thanks for that!
i also made the xml and json rework including edit. on my github page.
Thank you for letting me know. I do not work often with XML or JSON files and I am fine with using CudaLister for these cases.
adoeller
Senior Member
Senior Member
Posts: 401
Joined: 2011-05-23, 09:47 UTC

Re: CSV viewer editor transformer

Post by *adoeller »

KozakMak wrote: 2026-06-14, 06:36 UTC = How about smart (auto) comments? If the first line of the file starts with the # character = hidden ? example
i have it configured (ini) to use auto. meaning, skip comments and empty line at top. if you want to skip comments and empty lines all through the CSV, set it to hide manually or in the ini.
KozakMak wrote: 2026-06-14, 06:36 UTC = And pls add entry "resize columns". After I changed comments mode - the columns all become the same width :(
thats a bug. fixed.
KozakMak wrote: 2026-06-14, 06:36 UTC = What is the default detect string? "MULTIMEDIA & (ext="CSV" | ext="TAB" | ext="TSV")" ?
yes, thats right. it's passed to TC. maybe i should write it to the .inf-file during installation. the ini can restrict it more also regarding size. i know that this can be done in the wlx-configuration as well, but in the ini are more performance options available.

i needed to set a new sizelimit for the decimal alignment that i really needed and love:)
User avatar
KozakMak
Power Member
Power Member
Posts: 741
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: CSV viewer editor transformer

Post by *KozakMak »

2adoeller
This file has no comments (#) at all: https://pixeldrain.com/u/mF5DgcJ4
But 'hide' - hides two lines
OS: Win11 | TC: latest x64
adoeller
Senior Member
Senior Member
Posts: 401
Joined: 2011-05-23, 09:47 UTC

Re: CSV viewer editor transformer

Post by *adoeller »

KozakMak wrote: 2026-06-16, 14:30 UTC 2adoeller
This file has no comments (#) at all: https://pixeldrain.com/u/mF5DgcJ4
But 'hide' - hides two lines
; at line start were treated as comment lines. will narrow comments down to only one ; at the start
adoeller
Senior Member
Senior Member
Posts: 401
Joined: 2011-05-23, 09:47 UTC

Re: CSV viewer editor transformer

Post by *adoeller »

new version.

Comment lines only have one ; at the start
line starting with # are still line comments
fixed refresh glitch during reload
Post Reply