Hai,
Any one know how to read data from an excel sheet from vb.
Thanks
Karun
Printable View
Hai,
Any one know how to read data from an excel sheet from vb.
Thanks
Karun
...but when i was reading about ADO, MS made a big deal about being able to read from different data sources. They gave Emails as an example, and seeing that spreadsheets must be more of a structured format than most emails, i imagine its possible.
Maybe worth searching microsofts site for "ADO excel" or something?
Add MS Excel Object Library to your Project References.
Hope this helps!Code:Workbooks.Open FileName:="C:\YourFile.xls"
Workbooks.Application.Visible = True 'False to hide Excel from the user
SomeValue = Range("A1").Text
SomeOtherValue = Range("B1").Text
Workbooks.Application.Quit
Workbooks.Application.DisplayAlerts = False
If it is Tabular, you can also use the data control.