|
-
August 6th, 2009, 03:00 PM
#1
pulling specific text from a notepad document
Hi everyone,
I have a folder full of notepad documents containing source code from a web page.
I would like to pull certain text from the source code into an excel file. The text I am trying to grab appears in virtually the same spot in every document, however it may not always be the same length.
Here is a rough version of the code I'm working with. I've included the specific tags that surround the data I'm after (the <table> and <td> tags are not part of the specific tags, i just used them in the example code). These tags hold true throughout all of my data. There are multiple products in each text file.
The result sheet I'm after is just an excel spreadsheet with 4 columns, one including the product name, the price, the time sold, and the date sold. Also I need this to run on all the text documents in the folder. The text documents are named 1.txt,2.txt,3.txt, etc. For this lets say they are all saved in a folder C:\webpages
Code:
<html>
<body>
<table border="0" cellpadding="3px" cellspacing="3px">
<tr>
<td>
<span style="font-size: 1.1em; font-weight: bold;"><a href="tooth-brush.html">Tooth Brush</a> </span>
</td>
<td align="center">
<bold>05:00 PDT</bold>
</td>
<td>
<td align="center">
<strong>$2.00</strong>
</td>
<td>
<div style="font-size: 0.7em;">08-06-2009</div>
</td>
</tr>
</table>
<table border="0" cellpadding="3px" cellspacing="3px">
<tr>
<td>
<span style="font-size: 1.1em; font-weight: bold;"><a href="cell-phone.html">Cell Phone</a> </span>
</td>
<td align="center">
<bold>06:02 PDT</bold>
</td>
<td>
<td align="center">
<strong>$50.00</strong>
</td>
<td>
<div style="font-size: 0.7em;">08-06-2009</div>
</td>
</tr>
</table>
</body>
</html>
Thanks in advance
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|