in reply to Re^3: PERL : Parse/Open an excel file and replace the negative values in a sheet to '0'
in thread PERL : Parse/Open an excel file and replace the negative values in a sheet to '0'
Infact my problem is something else. If i am able to get the logic for the question i have asked for, i would be able to resolve. As far i came till now on this. Just incase if you would like to help.!
use warnings; use Spreadsheet::ParseExcel::SaveParser; my $parser = Spreadsheet::ParseExcel->new(); my $workbook = $parser->parse('Test.xls'); my $worksheet = $workbook->worksheets(1); my $row = 4; my $col = 5; my $cell = $worksheet->get_cell( $row, $col ); #print $cell,"\n"; print "value = ",$cell->value(), "\n"; my $cell_value = cell->value(); if($cell_value < 0 ) { $cell_value = 0; } $workbook->SaveAs( 'Test_Parse.xls' );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: PERL : Parse/Open an excel file and replace the negative values in a sheet to '0'
by GotToBTru (Prior) on May 28, 2015 at 14:13 UTC |