Lacky
unread,Jul 22, 2011, 1:10:03 PM7/22/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Spreadsheet::WriteExcel
Hi Everyone, could you please help what will be the correct syntax for
the Vlookup using perl below I tried it but didn't work
#!/usr/bin/perl -w
use strict;
use Cwd;
use Time::Local;
use Win32::OLE qw(in with);
use Win32::OLE::Const 'Microsoft Excel';
use warnings;
$Win32::OLE::Warn = 3; # die on
errors...
#my $lacSac = '';
#set the project path
my $Path = getcwd;
# get already active Excel application or open new
my $Excel = Win32::OLE->GetActiveObject('Excel.Application')
|| Win32::OLE->new('Excel.Application', 'Quit');
#my $Excel = Spreadsheet::WriteExcel->new('Excel.Application');
#make excel visible or not
$Excel->{Visible} = 0;
# Input sitelist
# open Excel file
my $Book = $Excel->Workbooks->Open("$Path\
\RND_CIQ_DALLAS_Ver_297_01-06-2011.xls");
my $Sheet = $Book->Worksheets(7); # select Active Excel
my $lac_sac = $Sheet->(VLOOKUP("Apple",B:C,2,FALSE)); #This is where
the error occured