Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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

by Anonymous Monk
on May 03, 2004 at 11:03 UTC ( [id://349983]=note: print w/replies, xml ) Need Help??


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

Hi aziz, Sorry that I am asking you a question instead of an answer.Can u give me the syntax to merge cells in excel using perl(with OLEs)? Thanks, Sree
  • Comment on Re: Re: Using Win32::OLE and Excel - Tips and Tricks

Replies are listed 'Best First'.
Editing Cell Hyperlink Using Perl OLE.pm
by Anonymous Monk on Jul 22, 2004 at 22:44 UTC
    I know how to read an Excel cell's hyperlink value. What is the syntax to set or change a cell's hyperlink value? -docuSwear

      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 => "http://www.perl.com/"}); # Get current directory using Cwd.pm $workbook->SaveAs({FileName => cwd() . '/win32ole.xls'}); $workbook->Close; __END__

      --
      John.

        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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (1)
As of 2025-07-08 14:19 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.