#!/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.
In reply to Re: Editing Cell Hyperlink Using Perl OLE.pm
by jmcnamara
in thread Using Win32::OLE and Excel - Tips and Tricks
by cacharbe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |