excel - Spreadsheet::ParseExcel $cell->value() returning undef -


i new perl , having trouble spreadsheet excel parser module.

when use $cell->value() on own line, there appears no problem, when try use insert value array, returns undef, code show below:

for $row ($row_min .. $row_max) {     @line;         $col ( $col_min .. $col_max) {                 $cell = $worksheet->get_cell( $row, $col );                 $value = $cell->value;                 push @line, $value if defined($cell);                 print $cell->value;                 print dumper $line;                 }           } } 

here print $cell->value; returns contents of cell print dumper $line; returns undef

you have push $cell->valuenot $value

push @line, $cell->value if defined($cell); 

you should add use strict @ beginning of program, error message in such case.


Comments