Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I tried testing to see what the value is an it gives me Win32::OLE=Hash(0x1832544) How would I be able to grab the actual name rather than this hash?#!/usr/bin/perl use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Excel'; #$Win32::OLE::Warn = 3; # die on errors +... # get already active Excel application or open new my $Excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OLE->new('Excel.Application', 'Quit'); # open Excel file my $Book = $Excel->Workbooks->Open("Reten_template.xls"); my $Sheet = $Book->Worksheets('JUN05');
Thanks in advance....#!/usr/bin/perl use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Excel'; # get already active Excel application or open new my $Excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OLE->new('Excel.Application', 'Quit'); # open Excel file my $Book = $Excel->Workbooks->Open("H:\\Scripts\\Reten_template.xls"); + my $Sheet = $Book->Worksheets(1); print "$Sheet\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Accessing Worksheet name in excel
by Tortue (Scribe) on Oct 09, 2005 at 19:24 UTC | |
by Anonymous Monk on Oct 10, 2005 at 00:07 UTC | |
by Tortue (Scribe) on Oct 10, 2005 at 09:05 UTC |