473,387 Members | 3,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to read a value from a table in an Web Page(html) that I get as a attachment to my mail box.? RegEX or Streaming???

Hello all!
Thank you for spending your time reading my problem.

I recive a daily mail with a file attached to it, the file is an HTML
file containing a table of currencey values per one USA Dollar,
I need to write a small Window(DescTop)- application, which will read a
value from that table and will update my DB With that value.
the page is already in my inbox not on the web, So no download is
needed.

I can find out how to open the file from the attachment, i may even
want the program to run immediatly when I recive the mail by creating a
rule on my Outlook that will call my program, I am still not sure how
to do it.
but My main dilema is: if to open the HTML file as stream like a text
file and search for the value, or maybe there is a class that will
represent the web page and thru this I can run over the controls of the
web page and get to my row and value.
I saw somthing about RegEX, Is that what I need??? Someone can show me
how to start with it?
Any help and suggestions about any part of this process will be
appriciated!

Thanks in advance!

Nov 17 '05 #1
4 1969
Is it the same page each day and is the page layout consistent?? If so then
I did something very similar and used REGEX to do it. I will try and find an
example of my code.

Best wishes

Paul Bromley

<Ef*****@moch.gov.il> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Hello all!
Thank you for spending your time reading my problem.

I recive a daily mail with a file attached to it, the file is an HTML
file containing a table of currencey values per one USA Dollar,
I need to write a small Window(DescTop)- application, which will read a
value from that table and will update my DB With that value.
the page is already in my inbox not on the web, So no download is
needed.

I can find out how to open the file from the attachment, i may even
want the program to run immediatly when I recive the mail by creating a
rule on my Outlook that will call my program, I am still not sure how
to do it.
but My main dilema is: if to open the HTML file as stream like a text
file and search for the value, or maybe there is a class that will
represent the web page and thru this I can run over the controls of the
web page and get to my row and value.
I saw somthing about RegEX, Is that what I need??? Someone can show me
how to start with it?
Any help and suggestions about any part of this process will be
appriciated!

Thanks in advance!

Nov 17 '05 #2
Dfraim,

I prefer the MSHTML class which uses completly the DOM.

See this sample for it.

http://www.vb-tips.com/default.aspx?...f-56dbb63fdf1c

I hope this helps,

Cor
Nov 17 '05 #3
<Ef*****@moch.gov.il> schrieb:
I recive a daily mail with a file attached to it, the file is an HTML
file containing a table of currencey values per one USA Dollar,
I need to write a small Window(DescTop)- application, which will read a
value from that table and will update my DB With that value.
the page is already in my inbox not on the web, So no download is
needed.


Parsing an HTML file:

MSHTML Reference
<URL:http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/mshtml/reference/reference.asp>

- or -

..NET Html Agility Pack: How to use malformed HTML just like it was
well-formed XML...
<URL:http://blogs.msdn.com/smourier/archive/2003/06/04/8265.aspx>

Download:

<URL:http://www.codefluent.com/smourier/download/htmlagilitypack.zip>

- or -

SgmlReader 1.4
<URL:http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=B90FDDCE-E60D-43F8-A5C4-C3BD760564BC>

If the file read is in XHTML format, you can use the classes contained in
the 'System.Xml' namespace for reading information from the file.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 17 '05 #4
Herfried K. Wagner, Cor and Paul Thanks so much.

Paul, the mail is the same every day and also the structure of the file
is the same. I will be very happy if you can find the code that you
rote and post it or send me otherways. (algtho at the meantime I am
trying the interesting things that Herfried sent).

Herfried , I did look a litelbit into the sgml and the AgilityHTML -
which I am going to try first, it looks simple and well done, and it
comes with the source code. Thank you.

I will look also into the example of MSHTML that Cor pointed.

Thank you all again.

Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Shiperton Henethe | last post by:
Dreamweaver 4 Hi Can anyone recommend a decent utility for compressing HTML that is safe - i.e. that *definitely* doesn't mess with the appearance in any browsers. I run a growing website...
2
by: pascal Joseph | last post by:
To reach their accompte ftp via a page html, I place a form for our customer on a page. I found this code. But it doesn't work because I reach the base of the server and not directly the own...
2
by: Mitch | last post by:
I have some simple HTML I'm trying to read with the XMLTextReader. As in the MSDS examples, I set up a loop to read each XML node: while (reader.Read()) { switch (reader.NodeType) { case...
5
by: alejandro lapeyre | last post by:
How can I load / parse an HTML file with .NET? Thanks! Best regards, Alejandro Lapeyre
1
by: Marek Kurowski | last post by:
Yo! I design web browser in VC++. I need a web browser, in which I can display html in a litle changed form. The best control is CHtmlView with IWebBorwser2 (do you know other way?). But in...
1
by: russel | last post by:
is iit possible t read html attachment thru vb if yes how to proceed
0
by: russel | last post by:
how do i read html attachment through vb
16
AmirGhaffary
by: AmirGhaffary | last post by:
Hi every body i heard about some technic that we can show Page.aspx in Page.html , i think this technic used in this site (www.thescripts.com) too , i wanna know how we can do that in asp.net ?? ...
9
by: baygan | last post by:
can anyone plz help me to write a code to read mail from one's inbox and store the mails to the local disk??? i forgot to say it would be preferably in java.. i would be very grateful if someone...
14
by: Zoro | last post by:
My task is to read html files from disk and save them onto SQL Server database field. I have created an nvarchar(max) field to hold them. The problem is that some characters, particularly html...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.