This how the spreadsheet part could look like:
use strict; use warnings; use HTML::TableExtract; use Spreadsheet::WriteExcel; my $filename = "table.xls"; my $workbook = Spreadsheet::WriteExcel->new($filename); my $response; { local $/ = undef; $response = <DATA>; } my $te = HTML::TableExtract->new( keep_html => 0 ); $te->parse($response); my $counter; foreach my $ts ($te->tables) { my $worksheet = $workbook->add_worksheet("Table ".$counter++); my $nrow=0; foreach my $row ($ts->rows) { my $ncol=0; foreach my $col (@$row) { $worksheet->write($nrow,$ncol++,$col) if defined $col; } $nrow++; } }
In reply to Re: How to dump a webpage content into a excel
by hdb
in thread How to dump a webpage content into a excel
by ghosh123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |