Click here to Skip to main content
14,770,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: (untagged)
Hello sir,


I have a bunch of html files and those were created from database contents.

Now i dont have that data by which my html files was generated and now i need that original data from html files.


Copy pasting is very time consuming process so Which is the best approach to convert these html files into excel so that i can upload these again in my database.



PLEASE guide me.

Thanks in advance dear.
Posted

1 solution

You can develop simple windows application( May be in C# or VB.net) where you can use Browser ActiveX component. Using this component you can parse the HTML and then you can manipulate the data.
   
Comments
PrafullaVedante 2-Jun-11 8:39am
   
Sorry ....i forgot to add ....

You can then write the data to CSV format which can be opened in Excel.
Vivek Deshmukh 2-Jun-11 8:43am
   
Sorry prafulla ,

I am not aware of these browser activex componants. I will try to implement this surely but please guide me how to start or paste any link by which i can start.

Please......
PrafullaVedante 3-Jun-11 2:54am
   
Craete an C# application.
Go to View ---> Toolbox

In the toolbox look for WebBrowser control


Drag it to your dialog box ....
Now in your code try to access webbrowser1.Document

here Document is nothing but the object of HtmlDocument.

You can use this object to manipulate the HTML loaded in the WebBrowser component.


(here webbrowser1 is the object of Webbrowser created by the Visual studio after you place the control on the dialog box. Name could be different in your case like webbrowser2, webbrowser3)
Vivek Deshmukh 3-Jun-11 6:35am
   
Hi dr,

I am at about to completion now.
Actually i am trying to import my html file into excel by excels web query functionality and its working but problem arrives if html contains div tag.

I will try this also.

Thanks for your time and consideration

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




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900