Solved

Importing HTML Multi Row into access (VBA?)

Posted on 2011-03-04
11
287 Views
Last Modified: 2012-08-13
I have an HTML document that has two lines per record. As you can see from the enclosed, the fields are not necessarily full for both lines.
I need to bring these into a new (or existing) table so they can be analyzed. In the enclosed you will see the location of text that is filled sometime and empty on others (Pips4idiots,LTP[tp], LTP, LTP[sl]) this can vary and is not limited to the three shown as an example. IN addition to the text, I would like to bring in the other fields.

I'm not extremely familiar with HTML, but have coded VBA and am fairly proficient at Access.

As this HTML format will always be the same format, I would like to have something that a user would just click on, select the file and it would import it. I can do everything up to the import. I dont know how best to handle the HTML and the two lines.
Any help would be appreciated.
demo.jpg
0
Comment
Question by:GNOVAK
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
11 Comments
 
LVL 40

Expert Comment

by:als315
ID: 35041890
You can read this HTML as text file and read it in VBA code.
May be example here can help you:
http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_26469684.html
0
 

Author Comment

by:GNOVAK
ID: 35056939
any ideas on how to address the dual lines?
0
 
LVL 40

Expert Comment

by:als315
ID: 35059579
If you upload a sample of html text, I can advice
0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35069979
Yes, it is difficult to even tell if this is in a Report, Table, Form or Query...

<I have an HTML document that has two lines per record.>
Clearly define "Lines"

A "line" to some means a Record/Row
So, you really cant have a record that spans two "lines"
Or are you referring to a "Line Wrap" in a field?

In any event, I would like to sea a sample DB that exhibits this issue as well.
0
 

Author Comment

by:GNOVAK
ID: 35192213
I'll upload a HTML example in a bit.
In the above screen shot, you can see two grey lines, two white, two grey, etc. Each pair (i.e. two grey) is to be  imported into one record in a table.

It appears in the HTML  as:
1234      23232       23222  
                1stuff       2stuff
2345      34566        34566
               mores        more2

I would need to place the above in a table that has 5 columns, 2 rows.
Make sense?
0
 
LVL 40

Expert Comment

by:als315
ID: 35196103
All seems possible. I'm waiting html.
0
 

Author Comment

by:GNOVAK
ID: 35245140
Here's an example file.

example.htm
0
 
LVL 40

Expert Comment

by:als315
ID: 35249862
Do you like this head:
Broker Name
Account: 12345   Name: hidden   Currency: USD   2010 July 27, 02:18

to be imported?
0
 

Author Comment

by:GNOVAK
ID: 35260091
Yes, optimally that would be present on every record.
0
 
LVL 40

Accepted Solution

by:
als315 earned 500 total points
ID: 35275642
Check this sample
HtmlImport.zip
0
 

Author Closing Comment

by:GNOVAK
ID: 35280986
EXCELLENT!
It really helps my understanding of HTML as well. Easier than I thought!
Thanks so much for the assistance and hanging in there with me.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question