Click here to Skip to main content
12,998,654 members (130,529 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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 0:19am
Updated 14-Feb-13 16: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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170622.1 | Last Updated 15 Feb 2013
Copyright © CodeProject, 1999-2017
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