in reply to Re: How to catch table format display from actual html using TableExtract?
in thread How to catch table format display from actual html using TableExtract?

Hi
Thanks for your reply.
I would like get the final output as ...
<table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="84" bgcolor="#000000"><font face="Arial Narrow" color=" +#FFFFFF"><strong>Account </strong></font></td> <td width="119" bgcolor="#000000"><font face="Arial Narrow" color= +"#FFFFFF"><strong>Detail</strong></font></td> <td width="86" bgcolor="#000000"><font face="Arial Narrow" color=" +#FFFFFF"><strong>Amount</strong></font></td> </tr> <tr> <td width="84" bgcolor="#C0C0C0"><small><font face="Arial Narrow" +>162456</font></small> </td> <td width="119" bgcolor="#C0C0C0"><font face="Arial Narrow"><smal +l>UNITED STATES 3217150214</small> </font></td> <td width="86" bgcolor="#C0C0C0"><small><font face="Arial Narrow" +>$1.00</font></small> </td> </tr> <tr> <td width="84" ><small><font face="Arial Narrow">162456</font></sm +all> </td> <td width="119" ><font face="Arial Narrow"><small>UNITED STATES 52 +17733259</small> </font></td> <td width="86" ><small><font face="Arial Narrow">$0.30</font></sma +ll> </td> </tr> <tr> <td width="84" bgcolor="#C0C0C0"><small><font face="Arial Narrow" +>162456</font></small> </td> <td width="119" bgcolor="#C0C0C0"><font face="Arial Narrow"><smal +l>UNITED STATES 4633895267</small> </font></td> <td width="86" bgcolor="#C0C0C0"><small><font face="Arial Narrow" +>$0.30</font></small> </td> </tr> <tr> <td width="84" ><small><font face="Arial Narrow">162456</font></sm +all> </td> <td width="119" ><font face="Arial Narrow"><small>UNITED STATES 60 +958767236</small> </font></td> <td width="86" ><small><font face="Arial Narrow">$0.10</font></sma +ll> </td> </tr> </table>
Thanks
  • Comment on Re: Re: How to catch table format display from actual html using TableExtract?
  • Download Code

Replies are listed 'Best First'.
Re: Re: Re: How to catch table format display from actual html using TableExtract?
by graff (Chancellor) on Jul 11, 2003 at 23:33 UTC
    I would like get the final output as ...

    Okay... so, uhm... what's stopping you from getting that, exactly? What are you getting instead? If you are getting what you want from the TableExtract module, the rest is just a matter of printing stuff out.

    You might want to look into something like HTML::Template, to have the page/table layout and all those font attributes in a separate html text file (not embedded in your perl code), and the perl script would just populate that template with the actual data values. (Or, if this is just a one-shot deal, just set up a nested loop: outer loop prints the table rows, inner loop prints the cells on each row. That way, at least you only have to state all those attributes once.)