• Login
Community
  • Login

Can I search among several xlsx files?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
5 Posts 3 Posters 2.0k 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.
  • W
    worldor
    last edited by Feb 4, 2023, 12:16 PM

    Hello!

    Can I search among the values and/or formulas among several xlsx files in a directory including its subfolders?
    If not directly, is it possible after I unzip the xlsx?

    Thanks!

    M 1 Reply Last reply Feb 4, 2023, 6:28 PM Reply Quote 0
    • M
      Mark Olson @worldor
      last edited by Mark Olson Feb 4, 2023, 6:30 PM Feb 4, 2023, 6:28 PM

      @worldor
      Given that xlsx files are binary, Notepad++ is probably a lousy tool to use for this, even if you did go to the trouble of unzipping the files.

      That said, I think dnGrep might meet your needs:
      dnGrep excel files.PNG
      Note that, as the example above shows, it seems that the grep tool searches in the result of an evaluated formula rather than in the text of the formula itself (i.e., it finds foobarfoobar because that’s what the formula returns even though the text of the formula is CONCAT(A1, A1).

      P 1 Reply Last reply Feb 4, 2023, 6:50 PM Reply Quote 1
      • P
        PeterJones @Mark Olson
        last edited by Feb 4, 2023, 6:50 PM

        @worldor ,

        As said, XLSX is a binary file. But if you do unzip the XLSX, it’s underlying data is text (XML, specifically)… So you could then use Notepad++'s Find in Files feature to search through all the XML files.

        (And if you’re going to unzip the XLSX to see the XML files, then there’s no reason to download some other grep application when Notepad++'s Find in Files will do that same search.)

        M 1 Reply Last reply Feb 4, 2023, 8:34 PM Reply Quote 2
        • M
          Mark Olson @PeterJones
          last edited by Mark Olson Feb 4, 2023, 8:35 PM Feb 4, 2023, 8:34 PM

          @PeterJones For my own amusement I’m working on a PythonScript to try to automate this, since it’s a little more fiddly than one might intuitively expect

          1 Reply Last reply Reply Quote 0
          • M
            Mark Olson
            last edited by Feb 5, 2023, 12:11 AM

            The Excel grepper tool is done. See https://github.com/molsonkiko/excel_grepper_npp .

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