View Single Post
  #1 (permalink)  
Old August 16th, 2004, 11:27 AM
belzicool belzicool is offline
Registered User
Points: 32, Level: 1
Points: 32, Level: 1 Points: 32, Level: 1 Points: 32, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2004
Location: pune, maharashtra, India.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to belzicool
Default data reading from excel using VB

I am working on a application which needs to read data from a excel file and then, depending on the value, write it to a access file (.mdb)
the problem is that how do i give the condition (till end of file )for the excel sheet
these are the excel and access connections i am using:

Set xlApp = New Excel.Application
xlApp.Workbooks.Open ("E:\nikhil\excel2access\input.xls") 'the excel file is now opened
xlApp.Worksheets("Sheet1").Activate ' the excel worksheet is now active for reading
i = 1
c = 2
Set cn = New Connection
cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & "E:\nikhil\excel2access\output.mdb;Persist Security Info=False"

cn.Open

cmd.ActiveConnection = cn
Reply With Quote