Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in .NET only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
.NET
help me! how to store data from excel using vb.net
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
winmani
New Member
Join Date:
Oct 2006
Posts:
1
#1
help me! how to store data from excel using vb.net
Oct 27 '06, 03:44 PM
hi buddies,
cud u explain, how to retrieve data from excel file and save into oracle database using vb.net.
mady1380
New Member
Join Date:
Sep 2006
Posts:
18
#2
Oct 31 '06, 12:23 PM
Originally posted by
winmani
hi buddies,
cud u explain, how to retrieve data from excel file and save into oracle database using vb.net.
hi
check this code
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load
'Put user code to initialize the page here
'Create new Excel Object
Dim MyExcel As Excel.Applicati on
MyExcel = New Excel.Applicati on
MyExcel.Display Alerts = False
MyExcel.Workboo ks.Open("C:\Ine tpub\wwwroot\We bApplication1\E xcel1.xls")
Label1.Text = MyExcel.ActiveW orkbook.ActiveS heet.Cells(1, 1).Value
'Insert data into particular cell of Excel Sheet
MyExcel.ActiveW orkbook.ActiveS heet.cells(2, 4) = "Example"
MyExcel.ActiveW orkbook.Save()
MyExcel.ActiveW orkbook.Close(F alse, "C:\Inetpub\www root\WebApplica tion1\Excel1.xl s")
MyExcel.Display Alerts = False
MyExcel.Quit()
ReleaseComObjec t(MyExcel)
MyExcel = Nothing
GC.Collect(1)
GC.WaitForPendi ngFinalizers()
End Sub
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment