Community
    • Login

    Display Column-numbers in csv-Datei

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 2 Posters 5.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Michael BernhardtM
      Michael Bernhardt
      last edited by

      Hello community,

      is there a way to display column-numbers in respect of the delimiter of a csv- or somhow separated txt-file?

      We often deal with huge csv-files (40+ columns), so it is sometimes helpful to know, in which column the cursor stands.

      Thanks for your time and suggestions!

      Kind regards
      Michael

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC
        Claudia Frank @Michael Bernhardt
        last edited by

        @Michael-Bernhardt

        not quite sure if I understand this correctly but how do you load the file?
        Does it already has been reformatted or is just the plain text file like

        text,text,text,text,...
        

        and you want to have something like

        1;   2;   3;   4;...
        text;text;text;text;...
        

        ??

        If so, no, afaik there isn’t a built in feature - I could come up with a python script but this
        would change the document by adding the numbers on top of the file. Don’t know it this is desired.

        Cheers
        Claudia

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • Michael BernhardtM
          Michael Bernhardt
          last edited by

          @Claudia-Frank

          Thank you for your quick response.

          Changing the file is not really intended. Furthermore the additional line would scroll out of sight, when moving downwards in the file. I don’t know if i can freeze the top-line in notepad++.

          What i’d like to achieve would be a ruler at the top of the window (like the tabulator display in MS-Word), where i can see the field-separator-positions and so the number of the column i am in.

          1 Reply Last reply Reply Quote 0
          • Michael BernhardtM
            Michael Bernhardt
            last edited by Michael Bernhardt

            One additional comment:

            Since the lines can have different layouts, number of fields and also fieldwidth, the ruler would have to adapt to the setup of the line the cursor is in.

            If the file consists of header, detail and footer records, it could look like:

            H;Col1 ;Col2 ;Col3
            D;Col1_______;Col2;____________Col3;__________Col4;________Col5
            F;Col1;___Col2;_________Col3

            Claudia FrankC 1 Reply Last reply Reply Quote 0
            • Claudia FrankC
              Claudia Frank @Michael Bernhardt
              last edited by

              @Michael-Bernhardt

              a python script could, temporarily, write a descriptive ruler as first line and keep it always visible.
              It could reformat the doc to have it more columnized or …

              Or it could overwrite a statusbar section. E.g the DOCTYPE section, the leftmost section on the bottom to show the current column
              or it could use npps second view to display it.

              If you are willing to install python script plugin I could try to write a script which does what you want.
              If so, please let me know what exactly should be done.

              Cheers
              Claudia

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors