Can't see commas in csv file



  • I just open a csv file (first time in life) and it display some “tabulation-like spaces” instead of the commas I can see when I open it on excel.

    Any clue? I just wanted to edit it manually with notepad++ but cant.

    Thanks :D



  • @Guillermo-Ruiz said:

    “tabulation-like spaces” instead of the commas

    A CSV file can contain any character deemed to be the “delimiter”. True, most often it is a comma (hence the name Comma Separated Value).

    In Excel, it does provide options to import a text file with any delimiter. If it doesn’t detect the default it will ask what delimiter it should use.

    In Notepad++ (NPP), use View, Show All Characters, this will help you see what the ‘delimiter’ is. If a TAB (shown as a arrow) then you can use the Edit, Blank Operations, convert TAB to space as a possible change. Then possibly a replace to change that to your preferred character to delimit the text.

    Terry



  • Actually, if you did see the arrow (once show all characters ticked) you could use the following regex (regular expression) to change those to the character you wish, in this case the comma.
    So under Search (main menu) use Replace. The fields are:
    Find What:\t
    Replace With:,

    As this is a regex the search mode MUST be “regular expression” Once the fields are entered you could hit the "Replace All’ button. All the tabs will be replaced by a comma.

    A proviso though. The comma MUST NOT be in any of the fields, else Excel will incorrectly interpret the field as being 2 fields. If this was a possibility the field MUST be contained within double quotes.

    If at all unsure of any of this, please do provide an example of your data (changing any confidential info). To display it correctly I’d suggest you read our FAQ section, in particular the post:
    https://notepad-plus-plus.org/community/topic/15739/faq-desk-request-for-help-without-sufficient-information-to-help-you
    as it will help you correctly insert examples into any post you make.

    Terry



  • Just perfect, great explanation full of detail and really quick.
    Everything fixed, thanks a lot.
    If there’s any way I can mark this as answered so other people can use the answer, just let me know, I havn’t find any.



  • I’m glad to be of service.

    Unfortunately I don’t know how to “tag” it as solved. Supposedly 2 years ago someone said Topic, then Tools. Unsure of where that is.

    Often we (the helpers) accept upvotes from you (the OP). That’s the /\0\/ that you see on the right, the /\ being my interpretation of the up arrow or ^ and likewise for the down arrow.

    You will see I gave you an upvote. We do like to hear back from the OP (opening poster) as to how well we helped, it gives us a warm fuzzy feeling inside.

    ;-)

    Terry



  • @Guillermo-Ruiz said:

    If there’s any way I can mark this as answered

    I think you have to tag it as a question first (when you use the Submit button on the posting) to be able to go back later and mark it as solved. Otherwise there is nothing to tag.



  • @Alan-Kilborn said:

    when you use the Submit button on the posting

    The Original Poster is allowed to go back to the Topic Tools menu at any time (until the topic is locked), and select “Ask as question”. Then after it’s marked as a question, the OP can mark it as solved from that same menu.


Log in to reply