Solved

importing htm files into excel sheet using VB

Posted on 2003-11-18
4
150 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
[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
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

732 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