intellij-csv-validator icon indicating copy to clipboard operation
intellij-csv-validator copied to clipboard

When adding new column (insert before), header cell and first row cell are treated as same

Open oxygenecore opened this issue 2 years ago • 2 comments
trafficstars

to reproduce:

  1. open csv file in table editing mode
  2. insert a column before some other one
  3. try to give it a name - that does not work (cell is not editable)
  4. give the name in text editor
  5. switch back to table editor - the both header cell and first row cell now have the same value of the field name

When editing this file in table editor, it now updates the field name (header cell value) together with first cell value. If you change the first row value, table editor will update the field name to the same value.

Reopening the file does not help.

oxygenecore avatar Jun 28 '23 09:06 oxygenecore

What you are describing is the actual wanted interaction: The values of the first row of any CSV is treated as the source for the header name, additionally the column index is shown. This prevents the need to define for each CSV file individually whether the first row are actually header values or not, and with that it removes the previously clumsy edit/non-edit handling of header values.

It might not be the ideal solution for commonly header enabled CSV files, it provides a streamlined editing experience for all kinds of CSV files, like those without a header row, or when having a comment in the first line of the file.

SeeSharpSoft avatar Jul 12 '23 00:07 SeeSharpSoft

Sorry, by the first row i meant the first value row. I do have a header row in all my csv files. The extension duplicates the header row into the first value row.

oxygenecore avatar Jul 12 '23 05:07 oxygenecore