I've looked far and wide, even so much as going to Microsoft's Excel hyperlinks reference page.

What is the structure/syntax one would use to edit an Excel cell's hyperlink value, using only Perl and Win32::OLE.pm?

I can read cell values and hyperlinks, and change cell values, but cant figure out how to modify the hyperlink.



Here are some of the things I've tried in vain:

• $worksheet->Range("D39")->Hyperlinks->{Address}="C:\\temp";
• $worksheet->Range("D39")->Hyperlinks->Add({Address => "C:\\temp"});
• $worksheet->Hyperlinks->Add({Address=>'C:\\temp'});
• $worksheet->Hyperlinks->Add({Anchor=>('D39'), Address=>'C:\\temp'});
• $cellObject->Hyperlinks->Add(Range('A2'), 'C:\\temp');


... and my personal favorite ...


$worksheet->Hyperlinks()->Add({ Address => "C:\\temp", Anchor => Selected, TextToDisplay => "AutoLink", });

I'd just like to know what structure will work.

Thanks,
-SplashCD


In reply to Modifying Excel hyperlink using PERL and OLE.pm by SplashCD

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.