Hi #!/usr/bin/perl -w
use strict; use Spreadsheet::ParseExcel; my $parser = Spreadsheet::ParseExcel->new(); my $workbook = $parser->parse('Book1.xls'); Like this , as per examples, we could open/read the existing excel files.but how can we execute other functions which are exclude in the Spreadsheet::ParseExcel. Like .... delete sheet , delete row, adding data ...etc. For that task , do we need to call Spreadsheet::WriteExcel package? Can somebody help me on this please? Many Thanks Luke ________________________________ From: Shlomi Fish <shlo...@iglu.org.il> To: beginners@perl.org Cc: luke devon <luke_de...@yahoo.com> Sent: Sunday, April 25, 2010 21:12:59 Subject: Re: Modify excel worrkbook in perl On Sunday 25 Apr 2010 10:12:02 luke devon wrote: > Hi > > I need to modify a excel file in perl and for which i installed perl in > ubuntu. > > 1. Open a existing excel file > > 2. delete an unwanted Sheet called "summary" > > 3. and i want to insert some data into range of cells ( B1:B11) > > Could you please tell me what is the most suitable perl module that we can > use ? > There are two modules for that on CPAN: 1. http://search.cpan.org/dist/Spreadsheet-WriteExcel/ . 2. http://search.cpan.org/dist/Spreadsheet-ParseExcel/ . Note that the Excel format (.xls) is binary and has been mostly undocumented for a long time, and even Excel itself (or at least MS Word) has had problems with forward-compatibility and backwards-compatibility of its own formats. Recently, the specification was released and it's horribly complicated: http://www.joelonsoftware.com/items/2008/02/19.html It's not mentioned in the link, but when it came out it came under a problematic EULA which prevented some use by open source software developers. As a result of all this, it is no guaranteed that the roundtrip to and from Excel will work. It's possible you'll have better luck with OpenOffice.org's support for Excel import and export, though naturally this is not 100% bullet- proof either. Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Original Riddles - http://www.shlomifish.org/puzzles/ Deletionists delete Wikipedia articles that they consider lame. Chuck Norris deletes deletionists whom he considers lame. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/