ijared has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on Please help me to copy Data from html table to an access database!
  • Download Code

Replies are listed 'Best First'.
Re: Please help me to copy Data from html table to an access database!
by marto (Cardinal) on Jul 05, 2007 at 18:14 UTC
Re: Please help me to copy Data from html table to an access database!
by jZed (Prior) on Jul 05, 2007 at 21:27 UTC
    The module DBD::AnyData can serve as a front-end to HTML::TableExtract. You can then use DBI to insert the data into Access. Something like this:
    #!/usr/bin/perl use warnings; use strict; use DBI; my $access_dbh= DBI->connect(...); my $ad_dbh= DBI->connect('dbi:AnyData(RaiseError=1):'); $ad_dbh->ad_catalog('Temp','HTMLtable', $url, { $html_table_extract_fl +ags}); my $select = $ad_dbh->prepare("SELECT * FROM Temp"); my $insert = $access_dbh->prepare("INSERT INTO foo VALUES(...)"); $select->execute; while( my $row = $select->fetchrow_arrayref ) { $insert->execute(@$row); }
    This presumes you have already created a table with the appropriate structure in Access.