473,386 Members | 1,741 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

help me! how to store data from excel using vb.net

hi buddies,

cud u explain, how to retrieve data from excel file and save into oracle database using vb.net.
Oct 27 '06 #1
1 4773
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.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here

'Create new Excel Object
Dim MyExcel As Excel.Application

MyExcel = New Excel.Application
MyExcel.DisplayAlerts = False
MyExcel.Workbooks.Open("C:\Inetpub\wwwroot\WebAppl ication1\Excel1.xls")
Label1.Text = MyExcel.ActiveWorkbook.ActiveSheet.Cells(1, 1).Value

'Insert data into particular cell of Excel Sheet
MyExcel.ActiveWorkbook.ActiveSheet.cells(2, 4) = "Example"

MyExcel.ActiveWorkbook.Save()
MyExcel.ActiveWorkbook.Close(False, "C:\Inetpub\wwwroot\WebApplication1\Excel1.xls ")
MyExcel.DisplayAlerts = False
MyExcel.Quit()


ReleaseComObject(MyExcel)
MyExcel = Nothing
GC.Collect(1)
GC.WaitForPendingFinalizers()
End Sub
Oct 31 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Ryan Case | last post by:
I am using Access to store data from a CAD program. We then in turn have another program pull data from Access to drive computerized saws. In order to get the data from the CAD program to Access, a...
0
by: steve | last post by:
Hi, I have created this application on VB.Net that is supposed to read a Dataset Table, store the values in a 2-dimensional array of Strings and export the data to Excel. The format of the...
7
by: Niyazi | last post by:
Hi, I am developing small insurance application using VB.NET and SQL server 2000. My tables in SQL server are: tbl_Customer (stores the custmer information) tbl_CustImage ...
3
by: Wired Hosting News | last post by:
Lets say I have 10 products in 10 different stores and every week I get a report from each store telling me how many items they have left for each of the 10 products. So each week I enter in 100...
5
by: AAJ | last post by:
Hi all FIRST THE BORING BITS....... I normally use a Database layer, a Business layer and a GUI layer. The GUI uses an Object data source to bind to the Business layer which in turn binds...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
1
by: shawleigh17 | last post by:
Hi, I am trying to figure out how I might ask for user input (Plant name) using a drop down list in an excel sheet then using/storing that data and dependent upon the name chosen, load data that...
1
by: jayafeb83 | last post by:
First I created One excel sheet, 3 rows and 3 columns and I retrieve excel data using ASP, that one I got the Answer I have to know thatretrieve from excel sheet and store the excel data in...
4
by: wellscrambled | last post by:
Folks, Probably don't have the right forum here, but this is all a bit new to me. I have a web site that sends me a daily email with an excel spreadsheet attachment that contains some customer...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.