djbryson has asked for the wisdom of the Perl Monks concerning the following question:
#1. Write an Excel file with previous data use strict; use Spreadsheet::ParseExcel::SaveParser; my $oExcel = new Spreadsheet::ParseExcel::SaveParser; my $oBook = $oExcel->Parse('temp.xls'); #1.1.Update and Insert Cells my $iFmt = $oBook->{Worksheet}[0]->{Cells}[0][0]->{FormatNo}; $oBook->AddCell(0, 0, 0, 'No(UPD)', $oBook->{Worksheet}[0]->{Cells}[0][0]->{FormatNo}); $oBook->AddCell(0, 1, 0, '304', $oBook->{Worksheet}[0]->{Cells}[0] +[0]); $oBook->AddCell(0, 1, 1, 'Kawai,Takanori', $iFmt); #1.2.add new worksheet my $iWkN = $oBook->AddWorksheet('Test'); #1.3 Save $oExcel->SaveAs($oBook, 'temp.xls'); # as the same name $oExcel->SaveAs($oBook, 'temp1.xls'); # another name
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SaveParser help
by andyford (Curate) on Dec 11, 2006 at 23:29 UTC |