Hi everyone,
I would like to copy the contents in a web page and write it in the word or excel file.
Say for example
If I give the URL of a web page then the system has to extract the content of that web page and write it in a word file or excel file.
I tried with the following code but I could only get the "Source Code" of the web page but I am in need of the contents.
Imports System.Net
Public Class Qwerty
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Using wc As New WebClient()
Dim myString
myString = wc.DownloadString(address:="http://msdn.microsoft.com/en-us/library/system.net.webclient.aspx#Y114")
Dim myfile As String = "D:\test.doc"
Dim objWriter As New System.IO.StreamWriter(myfile)
'Write string:
objWriter.Write(myString)
'Close objectwriter:
objWriter.Close()
End Using
'Succes:
MessageBox.Show("Writing succesful!")
End Sub
Any help ............???
I would like to copy the contents in a web page and write it in the word or excel file.
Say for example
If I give the URL of a web page then the system has to extract the content of that web page and write it in a word file or excel file.
I tried with the following code but I could only get the "Source Code" of the web page but I am in need of the contents.
Imports System.Net
Public Class Qwerty
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Using wc As New WebClient()
Dim myString
myString = wc.DownloadString(address:="http://msdn.microsoft.com/en-us/library/system.net.webclient.aspx#Y114")
Dim myfile As String = "D:\test.doc"
Dim objWriter As New System.IO.StreamWriter(myfile)
'Write string:
objWriter.Write(myString)
'Close objectwriter:
objWriter.Close()
End Using
'Succes:
MessageBox.Show("Writing succesful!")
End Sub
Any help ............???