• Login
Community
  • Login

[New Plugin] CSV Lint

Scheduled Pinned Locked Moved Notepad++ & Plugin Development
83 Posts 26 Posters 98.1k 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.
  • T
    Tanquen
    last edited by Jun 23, 2022, 6:30 PM

    I’m not able to get this plugin to work. I need to make sure it’s not adding any text/data. I just want to make the CSV data easier to read.
    My CSV has a large number of columns and different headers every few rows. It defaults to FixedLength but after changing to CSVDelimited it just adds the text “XML” at the top and nothing changes.

    Format=FixedLength
    ColNameHeader=False
    Col1=XML Text Width 9999

    Format=CSVDelimited
    ColNameHeader=False
    Col1=XML Text Width 9999

    B 1 Reply Last reply Jul 3, 2022, 9:18 AM Reply Quote 1
    • T
      T Switzer
      last edited by Jun 28, 2022, 3:00 PM

      any update planned to update CSV Lint to work with current version of notepad ++

      L B 2 Replies Last reply Jun 29, 2022, 6:09 PM Reply Quote 1
      • L
        Lycan Thrope @T Switzer
        last edited by Jun 29, 2022, 6:09 PM

        @t-switzer ,
        There already is, but since you haven’t posted which version of NPP you’re using, the assumption is that it is the latest version, and yes, there is an update for it. At present, you’ll need to delete the current version in the plugin folders, or it won’t allow the new NPP to start. Then after you get it started, you can install the newest plugin via the Plugin manager, or go to this site and download it yourself for a self install: CSVList Github page

        1 Reply Last reply Reply Quote 2
        • B
          Bas de Reuver @Tanquen
          last edited by Jul 3, 2022, 9:18 AM

          @Tanquen said in [New Plugin] CSV Lint:

          My CSV has a large number of columns and different headers every few rows. It defaults to FixedLength but after changing to CSVDelimited it just adds the text “XML” at the top and nothing changes.

          Thanks for mentioning your issue. It sounds like the plug-in can’t recognise this specific data file. I suspect the file includes many < or > characters as well as many , or ; characters or something like that. This can “confuse” the autodetect function so to speak, meaning it can’t determine which is the correct separator character, so it doesn’t interpret the data and columns correctly.

          Is it possible to send the data file to my e-mail address (see About dialog)? If it contains privacy sensitive data or is too large, then maybe edit the file and just include a few lines of data to reproduce this issue?

          Btw someone metioned a similar issue so in a future update I want to add a where you can (optionally) manually specify the separator character.

          In the mean time you can somehow manually construct the meta data, like below.

          Format=CSVDelimited
          ColNameHeader=False
          Col1=Field1 Text Width 50
          Col2=Field2 Text Width 50
          Col3=Field3 Text Width 50
          Col4=Field4 Text Width 50
          etc.

          Or alternatively, first try to delete the rows (if possible) that are causing trouble, so keep only a few rows with representative data, and then click Refresh from data, and then apply that resulting metadata to the complete file with all the rows.

          1 Reply Last reply Reply Quote 3
          • B
            Bas de Reuver @T Switzer
            last edited by Jul 3, 2022, 9:25 AM

            @T-Switzer said in [New Plugin] CSV Lint:

            any update planned to update CSV Lint to work with current version of notepad ++

            Like @Lycan-Thrope mentioned, there is a new CSV Lint v0.4.5.2 which you can manually download from the github page. That version will be included automatically in the Plugin Admin in the upcoming Notepad++ v8.4.3.

            It looks like the compatibility issues with the new Lexer v5 are solved now 🤞 and I want to wait and see before continuing and adding too many other features to the plug-in.

            1 Reply Last reply Reply Quote 3
            • P PeterJones referenced this topic on Jul 15, 2022, 3:55 PM
            • E
              Eric Yang
              last edited by Aug 29, 2022, 5:12 AM

              Is there a way not to change the background color? Notepad++'s default theme has white background so CSV Lint looks OK after syntax coloring. But I normally use Solarized theme (dark bg) and CSV Lint changes all the text to white background.

              B 1 Reply Last reply Sep 13, 2022, 8:48 PM Reply Quote 1
              • B Bas de Reuver referenced this topic on Sep 12, 2022, 9:25 PM
              • B
                Bas de Reuver @Eric Yang
                last edited by Sep 13, 2022, 8:48 PM

                @Eric-Yang sorry for the late answer, I had missing this post.

                You can go to the menu Plugins -> CSV Lint -> Settings there is a button “Colors” to select from 4 pre-defined colorsets for the column syntax highlighting, see color preview here.

                If you use a dark mode/dark background theme, then it’s best to select either Dark mode (pastel) or Dark mode (neon). Btw you need to close and restart Notepad++ before the new colors are visible.

                B 1 Reply Last reply Nov 9, 2022, 11:41 AM Reply Quote 3
                • B
                  Bas de Reuver @Bas de Reuver
                  last edited by Nov 9, 2022, 11:41 AM

                  With the Notepad++ update to v8.4.7 yesterday, the new Plugin Admin now also contains an update for CSVLint plug-in from v0.4.5.4 to v0.4.6.2. I hope the plugin will save everyone some time when working with csv files, let me know what you think.

                  It now also has a sort function and improved compatibility with Windows 11 unicode UTF8 setting. Also the default syntax highlighting now has 12 colors instead of 8, with a bit more pleasing colors imho.

                  csvlint_sort.png

                  See below for complete list of plugin updates and bugfixes since the last Notepad++ version:

                  v0.4.6

                  • Improved compatibility with Windows unicode UTF8 setting
                  • Sort data, new option to sort on column
                  • Split column, add options pad character and search and replace
                  • Split column, remove options when contains and decode multiple value
                  • Default color sets now have 12 colors instead of 8 (less repeats) + optimal color contrast
                  • Settings dialog, color set preview icons
                  • Autodetect improved, skip empty lines + clear message when nothing detected
                  • Metadata for fixed width, also output absolute positions

                  v0.4.6.1

                  • Apply quotes bugfix, also values that contain CrLf character
                  • Sort data and split column, use quotes correctly
                  • Sort data and split column, also support fixed width

                  v0.4.6.2

                  • Detect fixed width, allow manual column positions
                  • Button to toggle syntax highlighting
                  • Allow user to change font in docked window textboxes
                  D 1 Reply Last reply Nov 12, 2022, 7:04 PM Reply Quote 7
                  • D
                    datatraveller1 @Bas de Reuver
                    last edited by Nov 12, 2022, 7:04 PM

                    HI @Bas-de-Reuver,
                    Thank you for the plugin. The plugin is nice, but sometimes I want to switch to the original Notepad++ view for a .csv file. Is there an option to turn off the CSV Lint view?

                    D 1 Reply Last reply Nov 14, 2022, 1:59 PM Reply Quote 1
                    • D
                      datatraveller1 @datatraveller1
                      last edited by Nov 14, 2022, 1:59 PM

                      I have found out that switching the menu point “Language” - “CSVLint” to Language - “None (Normal Text)” is most probably the solution.

                      B 1 Reply Last reply Nov 21, 2022, 4:26 PM Reply Quote 0
                      • B
                        Bas de Reuver @datatraveller1
                        last edited by Nov 21, 2022, 4:26 PM

                        @datatraveller1 Yes you’re right , it’s the menu Language > None (Normal Text) to clear the syntax highlighting colors from a csv file.

                        Btw in the latest version of the plug-in v0.4.6.2 there is also a button on the docked windows to toggle between CSV Lint colors or no syntax highlighting. It does the same thing as the Language menu items though.

                        1 Reply Last reply Reply Quote 1
                        • F
                          Fruchtzwerg94
                          last edited by Nov 22, 2022, 8:55 PM

                          The latest version includes a PR which I’ve created exactly to target this issue:
                          PR: Added button to enable or disable language #42
                          GIF
                          Should be exactly what you are looking for in a very simple way.

                          1 Reply Last reply Reply Quote 4
                          • le dinhyenL
                            le dinhyen
                            last edited by Dec 8, 2022, 11:22 AM

                            Hello guys i’m newbie here :( i have a csv data as below. Is there any way to align it to column like excel did?

                            "@ABC_INFORMATION"
                            "ID1","ID2","ID3"
                            "ip1","ip2",""
                            
                            1 Reply Last reply Reply Quote 0
                            • D
                              datatraveller1
                              last edited by Dec 8, 2022, 7:53 PM

                              @le-dinhyen There is another plugin (CSVQuery) that displays the columns aligned, but this plugin is not suitable for editing. I would recommend a CSV editor for editing CSV files. (I could tell you good CSV editors, but they are not freeware).

                              BTW, your CSV file is not a valid CSV file. A CSV file must conform to RFC 4180 CSV rules (https://www.rfc-editor.org/rfc/rfc4180).
                              Each line must have the same number of fields, but your first line contains one field and the other three fields.

                              le dinhyenL 1 Reply Last reply Dec 9, 2022, 1:27 AM Reply Quote 4
                              • le dinhyenL
                                le dinhyen @datatraveller1
                                last edited by Dec 9, 2022, 1:27 AM

                                @datatraveller1 Yes . my csv file format is specific for customer system. we used to open it by rainbow csv in visual studio. i’m just wondering if we have any function that can display the columns aligned and edit it in realtime. Thank you so much for reply

                                1 Reply Last reply Reply Quote 0
                                • B Bas de Reuver referenced this topic on Mar 22, 2023, 9:51 PM
                                • Pierre de la VerreP
                                  Pierre de la Verre
                                  last edited by Mar 29, 2023, 8:10 AM

                                  Hi
                                  I just started with this plugin and have a problem …

                                  A CSV with 45 columns (650 characters long), semicolon : separator, 16 lines. The display in different colours is OK, but I want to “convert” it to a “space separated” file, like

                                  Col1        Col2    Col3
                                  1.2         4.5    John
                                  

                                  So I select “Reformat / Column Separator: Fixed Width”. The result is that is removed the defined header and creates a file with no space between the columns, like

                                  1.24.5John
                                  

                                  What is the problem here, how to do it right?

                                  Thanks

                                  L Pierre de la VerreP 2 Replies Last reply Mar 29, 2023, 8:55 PM Reply Quote 0
                                  • L
                                    Lycan Thrope @Pierre de la Verre
                                    last edited by Lycan Thrope Mar 29, 2023, 9:05 PM Mar 29, 2023, 8:55 PM

                                    @Pierre-de-la-Verre ,
                                    I was just messing with it myself to see what you were talking about, and the problem is that you need to read the help documentation. The fixed width puts it to the size of the fields, which means, there is no padding between the actual data, and the field boundaries as one runs into the next based on each columns defined width. I suspect if you want more space, you’ll need to make the fields larger than you really need them, so they’ll have some padding between the data in each field, and the size should also be larger than the header column names as well so those don’t run into one another.

                                    Here’s the help description for the Column Separator:

                                    Column separator

                                    Reformat the column separator, for example from comma separated , to semicolon separated ;. Any values that contain the new separator character will be put in quotes, for example "error; no read".

                                    When converting to fixed width format, it will use the width of each column as set in the metadata. Integer or decimal values will be right aligned, any other datatypes are left aligned.
                                    `

                                    Pierre de la VerreP 1 Reply Last reply Mar 30, 2023, 10:11 AM Reply Quote 3
                                    • Pierre de la VerreP
                                      Pierre de la Verre @Lycan Thrope
                                      last edited by Mar 30, 2023, 10:11 AM

                                      @Lycan-Thrope

                                      yes, beside the deleting of the header line, which is strange for me, it does what it describes. But as a suggestion for improvement I add screenshots from the CSV-Format-feature in UltraEdit, which seem more flexible (keeping of the separator!) and better to me.

                                      UE before
                                      ue_before.PNG

                                      UE after
                                      ue_after.PNG

                                      NPP before
                                      npp_before.PNG

                                      NPP after
                                      npp_after.PNG

                                      Alan KilbornA L 2 Replies Last reply Mar 30, 2023, 10:50 AM Reply Quote 0
                                      • Alan KilbornA
                                        Alan Kilborn @Pierre de la Verre
                                        last edited by Mar 30, 2023, 10:50 AM

                                        Is this an Excel support site??

                                        Pierre de la VerreP 1 Reply Last reply Mar 30, 2023, 11:42 AM Reply Quote 1
                                        • Pierre de la VerreP
                                          Pierre de la Verre @Alan Kilborn
                                          last edited by Mar 30, 2023, 11:42 AM

                                          @Alan-Kilborn said in [New Plugin] CSV Lint:

                                          Is this an Excel support site??

                                          ???

                                          Alan KilbornA 1 Reply Last reply Mar 30, 2023, 11:48 AM Reply Quote 0
                                          • First post
                                            Last post
                                          The Community of users of the Notepad++ text editor.
                                          Powered by NodeBB | Contributors