Re: processing XL using Win32::OLE
- From: aloknathlight@xxxxxxxxx (Alok Nath)
- Date: Thu, 28 Jun 2007 23:44:22 -0700 (PDT)
Found a good tutorial here :
http://www.perlmonks.org/?node=153486
----- Original Message ----
From: alok nath <aloknathlight@xxxxxxxxx>
To: beginners@xxxxxxxx
Sent: Friday, June 29, 2007 10:42:56 AM
Subject: processing XL using Win32::OLE
Hi,
Can anybody tell how to open an already existing xL file
and then probabaly do some processing using Win32::OLE
I found quite a few examples but none of them open an
existing excel file.
Or is there some better module for XL processing ?
Here is my code ..
use strict ;
use warnings ;
use Win32::OLE;
use Win32::OLE::Const;
my $file = "Matrix.xls" ;
my $ex ;
eval {$ex = Win32::OLE->GetActiveObject('Excel.Application')};
die "Excel not installed" if $@;
unless (defined $ex) {
$ex = Win32::OLE->new($file, sub {$_[0]->Quit;})
or die "Oops, cannot start Excel";
}
# get a new workbook
my $book = $ex->Workbooks->Add;
my $Sheet = $book->Worksheets(1);
$***->{Name} = 'Candle';
$book->Close;
Thanks
Alok.
____________________________________________________________________________________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/
____________________________________________________________________________________
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=list&sid=396546091
- Prev by Date: CPU/Memory usage of a process on Windows machine
- Next by Date: Re: Net::SFTP functions
- Previous by thread: Re: processing XL using Win32::OLE
- Next by thread: Spread*** IO::Scalar v. PerlIO::Scalar confusion
- Index(es):