Solved

importing htm files into excel sheet using VB

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

808 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