LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Import from HTML-table

    Employee
    Posted 12-28-2011 02:08

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: dvs79

    Hi! Is there any way to import data from a table inside an html-document? Besides creating java- or python-node.


  • 2.  RE: Import from HTML-table

    Employee
    Posted 12-29-2011 10:34

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: mgajdosik

    Hi,

    this is really specific task. Depends on what your table looks like, if you want to extract field names from <th> elements or in <tr>, is there only one table present etc.

    Very primitive kind of way that may help you is to use delimited node and as Record Delimiter use "<tr", field delimiter set to something like "notApplicable" and FieldNames: "DATA", Then in filter node use follwoing script right after delimited node.:

    override emit DATA.substr(0,DATA.strFind("</tr>")).trim() as DATA
    where DATA.strFind("</tr>")>-1

    This should give you a good start for expanding the records into columns.

    There are also other ways, like read in as XML file and then extract details. from tr and td elements. If you have only one specifically formatted file, you can send it and I can have a look, if you need more generic solution, then I can be of limited help as well, depending on what settings you want to apply.

    Marek


  • 3.  RE: Import from HTML-table

    Employee
    Posted 12-30-2011 02:55

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: dvs79

    Hi, Marek! Thanks a lot.
    No, I don't need some general solution - just to learn the way how to do it.
    Here's the sample from my table. If you could show how to import it, I'd be happy
    Attachments:
    ABC-8x_exmpl.zip


  • 4.  RE: Import from HTML-table

    Employee
    Posted 12-30-2011 05:09

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: mgajdosik

    Hi, see the attached graph. It is specific and different html tables may require changes, also please rename the field names in last node, russian does not display well on my computer.

    Marek
    Attachments:
    HTML_Table_Reader.brg


  • 5.  RE: Import from HTML-table

    Employee
    Posted 01-03-2012 08:42

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: dvs79

    Marek, thank you! works perfectly!