Community
    • Login

    Find Text Copied From Excel Cell

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    6 Posts 4 Posters 36 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.
    • Mark AndersonM
      Mark Anderson
      last edited by

      Hello all,

      I recently updated my Notepad++ form v8.8.5 to v8.8.8 and I have noticed an strange issue with the Find function.

      I have been using the Find function to search for names in multiple open documents. These names I have listed in an Excel spreadsheet. Normally I just copy the cell from the Excel and paste it into the ‘Find what:’ box and then click Find All in All Opened Documents. This has worked perfectly.

      Since updating, when I do the same thing, after clicking the find all button the Search Mode changes to Extended, and now my text has ‘\r\n’ in front of it. Even if I select normal mode before searching this happens. If I type the text I want to find manually it works as it previously did.

      Here is what it looks like prior to finding:
      Before Search.jpg

      And here it is after clicking Find All in All Opened Documents:
      After Search.jpg

      Is there a setting I’m missing or has something changed since v8.8.5 that means I cannot copy and paste from an spreadsheet cell and search for the text in it anymore?

      Alan KilbornA 1 Reply Last reply Reply Quote 1
      • Alan KilbornA
        Alan Kilborn @Mark Anderson
        last edited by

        @Mark-Anderson

        You have line-ending characters in your data.
        Delete off the \r\n in your Find what data.

        Mark AndersonM 1 Reply Last reply Reply Quote 0
        • Mark AndersonM
          Mark Anderson @Alan Kilborn
          last edited by

          @Alan-Kilborn

          I understand there are line-ending characters in my data in the second screenshot, but I didn’t put them there. They were automatically put in by Notepad++ after i tried to find the data from the first screenshot

          PeterJonesP Alan KilbornA 2 Replies Last reply Reply Quote 1
          • PeterJonesP
            PeterJones @Mark Anderson
            last edited by PeterJones

            @Mark-Anderson said in Find Text Copied From Excel Cell:

            I understand there are line-ending characters in my data in the second screenshot, but I didn’t put them there

            You didn’t knowingly put them there.

            In v8.8.6, Notepad++ implemented a long-requested feature, where if you select multiple lines, it would be able to all go in the FIND WHAT box, rather than just a single-line’s worth. To do that, Notepad++ had to start honoring the newlines that were in selected text. This was a good thing for most, BUT not for situations like yours.

            Specifically, now, when you select an entire line before doing FIND, if your selection includes the newline – and it usually does, especially if you use the margin-click or triple-click, as shown in the screenshots below – then the search string contains the newlines that you didn’t notice.

            399c5a90-5284-4715-8133-511f0fc22c47-image.png
            -> in this condition, the newline sequence is selected, though you might not notice it, and you won’t see it in the FIND WHAT at first.

            vs

            71213e9b-5ce4-4727-b59f-0697b2f71d90-image.png
            -> in this condition, the newline sequence is NOT selected, so those characters won’t be in the FIND WHAT box.

            But by default, the FIND WHAT does not show the newline characters. So you cannot see that they are there. But they are, because you (unknowingly) selected the newline characters when you selected the whole line.

            But, after you run the Search Mode = Normal search, then since there’s newline characters, Notpead++ converts from Normal to Extended, and starts showing the newline sequence, as reported in the old closed-bug-report #11847. The advice that @Alan-Kilborn gave in a related recent issue a few days ago still holds for you as well.

            1 Reply Last reply Reply Quote 1
            • Alan KilbornA
              Alan Kilborn @Mark Anderson
              last edited by

              @Mark-Anderson said:

              I understand there are line-ending characters in my data in the second screenshot, but I didn’t put them there. They were automatically put in by Notepad++ after i tried to find the data from the first screenshot

              No, they were already there, they just had no real visible component until Notepad++ switched the search to Extended mode and showed them to you as \r\n.

              Apparently, when you do a copy from Excel, the data in the cell is copied, and a line-ending is copied as well (I didn’t check this; don’t have Excel). So, yes, YOU did it, not Notepad++.

              1 Reply Last reply Reply Quote 1
              • guy038G
                guy038
                last edited by guy038

                Hello, @mark-anderson, @peterjones, @alan-kilborn and All,

                Unfortunately, see my last issue_comment :

                https://github.com/notepad-plus-plus/notepad-plus-plus/issues/17227#issuecomment-3590625658

                BR,

                guy038

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