in reply to Re^2: Adding Excel sheet
in thread Adding Excel sheet
To this new blank worksheet first add the cells from the prior month's worksheet that are the same in the new month's worksheet for example:$oBook->AddWorksheet('February');
Adding the sales for the new month to the new sheet using the AddCell method as well. Finally save the workbook under a new name using the SaveAs method.my $oOld_Sheet = $oBook->{Worksheet}[0]; for (my $row = 0; $row <= 4; $row++) { my $oCell = $oOld_Sheet->{Cells}[$row][0]; if (defined $oCell->{Val}) { $oBook->AddCell(1, $row, 0, $oCell->{Val}, $oCell); } }
If you really need to edit a cell then Win32::OLE as InfiniteSilence and davidrw mentioned is probably what you will have to use, also if the worksheet you are adding contains formulas.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Adding Excel sheet
by Fuism (Beadle) on Oct 19, 2005 at 15:13 UTC |