Reading in Excel Files

jasonw1357

New member
Joined
Mar 15, 2007
Messages
1
Programming Experience
Beginner
Hello all,

I am trying to create an application that reads values from Excel into VB.Net. I know how to create excel files from within VB using:
Imports Microsoft.Office.Core
Imports Excel
PublicClass Form1
Inherits System.Windows.Forms.Form
PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim MyWB As Workbook
Dim MyWS As Worksheet
MyWB = New Excel.Application()
MyWS = MyWB.Worksheets()
.
.
.

Eventually I assign values to cells using
MyWS.Range("A1").Value = whatever
What I am trying to do now is the reverse of this: Open an existing Excel file and read in all the data.

Any advice?
Thanks in advance
Jason
 
Back
Top