Avatar of GNOVAK
GNOVAK
Flag for United States of America asked on

Importing HTML Multi Row into access (VBA?)

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
Microsoft AccessMicrosoft Development

Avatar of undefined
Last Comment
GNOVAK

8/22/2022 - Mon
als315

You can read this HTML as text file and read it in VBA code.
May be example here can help you:
https://www.experts-exchange.com/questions/26469684/VBA-How-can-I-extract-the-data-from-an-html-to-put-into-a-table.html
GNOVAK

ASKER
any ideas on how to address the dual lines?
als315

If you upload a sample of html text, I can advice
Your help has saved me hundreds of hours of internet surfing.
fblack61
Jeffrey Coachman

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.
GNOVAK

ASKER
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?
als315

All seems possible. I'm waiting html.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
GNOVAK

ASKER
Here's an example file.

example.htm
als315

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

to be imported?
GNOVAK

ASKER
Yes, optimally that would be present on every record.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
ASKER CERTIFIED SOLUTION
als315

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
GNOVAK

ASKER
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.