Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Using Win32::OLE and Excel - Tips and Tricks

by Anonymous Monk
on Dec 24, 2003 at 14:56 UTC ( [id://316857]=note: print w/replies, xml ) Need Help??


in reply to Using Win32::OLE and Excel - Tips and Tricks

++article :-D ---> many thanks. Being new to perl this article is the closest thing I have for the bible right now... But... I have a few more question: I'm looking for a way to search for a certain value in my spreadsheet and getting it's location (inside my selected area). Finding is the easy part: $Sheet->Range("A1:B10")->Find("text to find") but now what??? 10x a 10^6, grupy.
  • Comment on Re: Using Win32::OLE and Excel - Tips and Tricks

Replies are listed 'Best First'.
Re: Re: Using Win32::OLE and Excel - Tips and Tricks
by maa (Pilgrim) on Dec 24, 2003 at 15:32 UTC
    Hi,
    If you look at the VB from a macro it is... Cells(r,c).Find(...).Activate which tells you that the $Sheet->Range("A1:B10")->Find() operation is returning something... that you can "->Activate" it means that it is a Range object you're getting back... so you can try
    my $Range=$Sheet->Range("A1:B10")->Find("bob");

    HTH - Mark

      Wow... Thanks a lot!!! it was a great help, even though it took me a while to figure out how to extract the info I needed from the return value (it returns a hash so I had to do something like casting just to see the possible values...) cheers for the quick (and usefull) reply! grupy.
        That Tutorial is great, but I already made a Macro, and now it is quite a lot of work to convert it into perl. So is there a way to insert a macro (eg. from a textfile) into an existing excel workbook and run it form a perl program? Sorry for my lack of english but this isn't my native language.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://316857]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2025-07-11 05:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.