Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Editing Cell Hyperlink Using Perl

by jmcnamara (Monsignor)
on Jul 23, 2004 at 06:36 UTC ( #376815=note: print w/ replies, xml ) Need Help??

in reply to Editing Cell Hyperlink Using Perl
in thread Using Win32::OLE and Excel - Tips and Tricks

Here is a short example:

#!/usr/bin/perl -w use strict; use Cwd; use Win32::OLE; use Win32::OLE::Const 'Microsoft Excel'; my $application = Win32::OLE->new("Excel.Application"); my $workbook = $application->Workbooks->Add; my $worksheet = $workbook->Worksheets(1); # Write a hyperlink my $range = $worksheet->Range("B2:B2"); $worksheet->Hyperlinks->Add({Anchor => $range, Address => ""}); # Get current directory using $workbook->SaveAs({FileName => cwd() . '/win32ole.xls'}); $workbook->Close; __END__


Comment on Re: Editing Cell Hyperlink Using Perl
Download Code
Replies are listed 'Best First'.
Re^2: Reading Cell Hyperlink Using Perl
by Anonymous Monk on Oct 19, 2007 at 18:08 UTC
    OK so how DO you read an Excel cell's hyperlink value with Win32::OLE; That is what I'm stuck on. It seems to be in $range->{'Hyperlinks'}->{'Item'} but I can't read Item. tnks hal

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (10)
As of 2015-11-25 07:55 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (672 votes), past polls