ram31 has asked for the wisdom of the Perl Monks concerning the following question:
for my $worksheet ( $workbook->worksheets() ) { my ( $row_min, $row_max ) = $worksheet->row_range(); my ( $col_min, $col_max ) = $worksheet->col_range(); open (FILE,">>","output.txt"); for my $row ( $row_min .. $row_max ) { for my $col ( $col_min .. $col_max ) { my $cell = $worksheet->get_cell( $row, $col ); next unless $cell; print FILE "$cell->value()"; } }
Incorrect output: Spreadsheet::ParseExcel::Cell=HASH(0xa02fa74)->value()Spreadsheet::Par +seExcel::Cell=HASH(0xa249680)->value Expected output: text1 text2 etc
I could print the data to standard terminal or redirect the output to file. I want to create output.txt file to process the data inside perl script further .
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Write content of excel data in to text file
by toolic (Bishop) on Dec 05, 2013 at 20:35 UTC | |
by ram31 (Novice) on Dec 05, 2013 at 20:46 UTC |