[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

importing htm files into excel sheet using VB

Posted on 2003-11-18
4
Medium Priority
?
156 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 120 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

649 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