Click here to Skip to main content
11,921,353 members (63,165 online)
Rate this:
Please Sign up or sign in to vote.
See more: C#2.0 C# Access
Dear all,

I have web pages with tabel formate data how i can extract the data to database using windows application. Please help me.
Posted 14-Feb-13 1:19am
Edited 14-Feb-13 17:47pm
Do you want to extract a html table data into a database access file?
Member 7993229 14-Feb-13 7:54am
Is your code that builds the html page or the table is part of another page?
Member 7993229 14-Feb-13 22:48pm
i dont have any code for extracting data from HTML page. Please let me know the code.
Solution 2
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Save the data using ADO.NET as per your table structure, e.g: row wise.

These will help:
MSDN: Accessing Data with ADO.NET[^]
Simple ADO.NET Database Read, Insert, Update and Delete using C#.[^]
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

I recommend you the "Html Agility Pack".

You can found it in here.

Some example how to use it here.

Sample code:
HtmlDocument doc = new HtmlDocument();
doc.LoadHtml(@"<html><body><p><table id=""foo""><tr><th>hello</th></tr><tr><td>world</td></tr></table></body></html>");
foreach (HtmlNode table in doc.DocumentNode.SelectNodes("//table")) {
    Console.WriteLine("Found: " + table.Id);
    foreach (HtmlNode row in table.SelectNodes("tr")) {
        foreach (HtmlNode cell in row.SelectNodes("th|td")) {
            Console.WriteLine("cell: " + cell.InnerText);

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 553
1 Dave Kreskowiak 245
2 phil.o 160
3 KrunalRohit 134
4 Sergey Alexandrovich Kryukov 132
0 OriginalGriff 6,951
1 KrunalRohit 4,530
2 Sergey Alexandrovich Kryukov 3,171
3 George Jonsson 2,840
4 Suvendu Shekhar Giri 2,181

Advertise | Privacy | Mobile
Web03 | 2.8.151120.1 | Last Updated 15 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100