developer has asked for the wisdom of the Perl Monks concerning the following question:

Hello: I am trying to get the Hyperlink value from an excel cell using OLE. I am able to get a count of the Hyperlinks. But when I get the value to a variable and try to print the variable I get Win32::OLE=Hast(.....). Can some please help. This is my code:
$h=$Sheet->Hyperlinks->Count; $hlv=$Sheet->Hyperlinks(1);
When I print $hlv I get this error:
Win32::OLE=HASH(0x1a4b6b0)
Thanks

Replies are listed 'Best First'.
Re: Reterive Hyperlink Value using OLE form Excel
by NetWallah (Canon) on Mar 10, 2004 at 21:55 UTC
    What you are probably looking for is :
    $hlv=$Sheet->Hyperlinks(1)->Address;
    Address property as it applies to the Hyperlink object.

    Returns or sets the address of the target document. Read/write String.

Re: Reterive Hyperlink Value using OLE form Excel
by tachyon (Chancellor) on Mar 10, 2004 at 22:09 UTC

    When you see something like HASH(0x1a2b3c4d) it means you are looking at a reference. To look inside such things Data::Dumper is quite useful. For example have a look at:

    use Data::Dumper; print Dumper( $hlv->$Sheer->Hyperlinks(1) )
    and you will be able to see you need to add ->Address to your call to get the value you want.

    cheers

    tachyon