Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re^3: Search Entire Excel Workbook For Text

by dasgar (Priest)
on Oct 16, 2012 at 17:18 UTC ( #999384=note: print w/replies, xml ) Need Help??

in reply to Re^2: Search Entire Excel Workbook For Text
in thread (( Resolved )) Search Entire Excel Workbook For Text

You're mostly correct. Most of your post was talking about XML, which I think could confuse folks about what you're needing help with: XML or Excel.

What OS are you on? If you're on Windows, do you have Excel installed and available for use? Which Excel version is the file that you're using?

  • As for Excel file type, there's the older .xls version and the newer .xlsx type. Very different structures.
  • From non-Windows OSes and Windows without Excel, you'll probably be interested in Spreadsheet::ParseExcel for the older .xls file type and Spreadsheet::XLSX for the newer .xls.
  • From a Windows system with Excel, I personally would use Win32::OLE to control Excel to access the Excel file.
  • Also, with the .xlsx file type, there's another route to go. I believe that's just a compressed XML file. That means that you can uncompress it and then do XML parsing. If you go that route, then sundialsvc4's response about using XPath type modules for XML parsing now becomes very applicable.
  • Comment on Re^3: Search Entire Excel Workbook For Text

Replies are listed 'Best First'.
Re^4: Search Entire Excel Workbook For Text
by ImJustAFriend (Beadle) on Oct 17, 2012 at 14:48 UTC

    Thank you for your post and info, dasgar. My sincere apologies for the misleading post, to you and to sundialsvc4.

    I need help with Excel, not the XML. I am looking for a way to search for a particular string within an Excel spreadsheet (say "ce0_ipaddress") in a workbook, hopefully with results like "found ce0_ipaddress in worksheet 'Server1 IP Info' in column 0 of row 35". Is that even possible?

    In answer to your questions:
    OS: Windows XP
    Excel: I have Office 2007 installed and ready
    File format: .xls file, not .xlsx

    Thanks again!!


      You could use the module Spreadsheet::ParseExcel to read the values of cells, you then need to do some coding to compare these values and create the output you required.

        Thanks Marto. I am already using Spreadsheet::ParseExcel to read the cell values. My question is the "do some coding" piece of your response...

        Thanks again!!


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://999384]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2018-02-25 00:34 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (312 votes). Check out past polls.