From: <[EMAIL PROTECTED]> > I want to writting a perl script which let me override/edit > the existing or created XLS. But I am unable to do that. I am not sure, > do I have to use few more CPAN module or what . Your help in this > regard will be > appreciated. Please find the snippet of the code which I have > for the creation of the XL sheet for your kind reference as below. > > #!/usr/bin/perl -w > > use strict; > use Spreadsheet::WriteExcel; > > # Create a new Excel workbook called perl.xls > my $workbook = Spreadsheet::WriteExcel->new("perl.xls");
You should test whether the constructor succeeded and $workbook is defined. And print the error Spreadsheet::WriteExcel reports. > > Here, at first time I am able to open a XLS and write to that, > but if I want to do some changes next time, then it is not allowing me > to do that. > and getting the follwing error. > > C:\Documents and Settings\x0069183\Desktop\Mustafa>perl hello.pl > > Can't open perl.xls. It may be in use or protected at hello.pl > line 13 > (in cleanup) You opened the file in Excel and are looking at it while you attempt to run the script again, right? Excel locks the file! Jenda ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs