Solved

importing htm files into excel sheet using VB

Posted on 2003-11-18
4
149 Views
Last Modified: 2010-05-03
hi,

i would like to write a macro inside a excel table, which do the following things.
say i have a folder contains several html files.

i want to import the file names, the characters from all the html files ("the source code"),
and then filter the texts i want.

e.g.
a html file contains:
<table>
<tr>
<td>hello</td>
<td>bye</td>
</tr>
</table>

i want to search the character ">" and copy all the text after it till i find "<",
like ">"hello"<", i want to have hello which is between ">" and "<".

any body could help me? thanx.
0
Comment
Question by:stustatester
4 Comments
 
LVL 26

Accepted Solution

by:
EDDYKT earned 30 total points
ID: 9770587
Dim arr1, arr2
Dim I As Long
Dim str As String

str = "<table><tr><td>hello</td><td>bye</td></tr></table>"
arr1 = Split(str, "<td>")
For I = 1 To UBound(arr1)
    arr2 = Split(arr1(I), "<")
    Debug.Print arr2(0)
    Erase arr2
Next
Erase arr1
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 10548672
Moderator, my recommended disposition is:

    Accept EDDYKT's comment(s) as an answer.

Dan Rollins -- EE database cleanup volunteer
0

Featured Post

Independent Software Vendors: 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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

685 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