in reply to Webpage to Excel

Both Excel and Open Office can read an HTML table directly into their spreadsheet components.

If that does not work for you, maybe you can be a bit more specific in what code you have written, what it should do, and how it fails to do what you want.

Also see UNO, Spreadsheet::WriteExcel, Mojo::DOM, LPW::Simple, WWW::Mechanize, HTML::TableExtract.

Replies are listed 'Best First'.
Re^2: Webpage to Excel
by perl.j (Pilgrim) on Aug 06, 2011 at 15:26 UTC
    The reason for posting this node was not to get help with semi-written code, but to learn a technique that may help me do other things in Perl. I did not know Open Office/Excel could do this without Perl (thanks for that info by the way), but I would still like to learn to do this with Perl for future reference. Thank You for the links. You were (and always are :) a great help.
    --perl.j

      The simplest technique is to fetch the page by URL with LWP::Simple, and extract the table with HTML::TableExtract. If the site requires more elaborate navigation in order to produce the table, you might need WWW::Mechanize. But Mechanize may be overkill if all you need is to fetch a document at a specific URL.

      Once you've fetched the document and parsed out the table, I assume you know how to plug it in to Excel, as you mentioned you already know how to insert text into an Excel document.

      Rather than provide an example of using LWP::Simple and HTML::TableExtract myself, I'll refer you to the synopsis section of their documentation. Both of them have good documentation and easy to follow SYNOPSIS sections in their POD. You can do a lot better by reading the POD than by looking at my cobbled-together example.


      Dave

        Thank You so much Davido!
        --perl.j