hello
i have an application where i need to pull in data from the excel worksheet and store it in the database (oracle)
If excel workbook isnt open i need to open it.Based on a timer if the file is open then i need to capture data and update database, if closed i need to open it and then update database. How do i check if a file is open. if it is open then i need to pull in data and update the database.
b) This excel sheet has 2 columns. first column has the currency name and the second column the conversion value. the onversion value changes regularly i need to check for it every 15 seconds. My database has a field which records the conversion value at any given time. How do i insert the right conversion value in the database from the excel sheet.
i am using the CreateObject method the syntax i am using is
Private Sub Tim()
Dim objExcel As New Excel.Application
Dim objBook As Workbook
Dim objSheet As Worksheet
Set objExcel = GetObject("C:\aexcel.xls", "Excel.Application"
Set objBook = objExcel.ActiveWorkbook
Set objSheet = objBook.Sheets(1)
( here i need to write code to store the cell vaues in an array for updatingthe database)
Exit Sub
errorhandler:
MsgBox Err.Description
end sub
I am getting a error at objExcel = GetObject("C:\aexcel.xls", "Excel.Application"
Could somebody help me
Help needed urgently
i have an application where i need to pull in data from the excel worksheet and store it in the database (oracle)
If excel workbook isnt open i need to open it.Based on a timer if the file is open then i need to capture data and update database, if closed i need to open it and then update database. How do i check if a file is open. if it is open then i need to pull in data and update the database.
b) This excel sheet has 2 columns. first column has the currency name and the second column the conversion value. the onversion value changes regularly i need to check for it every 15 seconds. My database has a field which records the conversion value at any given time. How do i insert the right conversion value in the database from the excel sheet.
i am using the CreateObject method the syntax i am using is
Private Sub Tim()
Dim objExcel As New Excel.Application
Dim objBook As Workbook
Dim objSheet As Worksheet
Set objExcel = GetObject("C:\aexcel.xls", "Excel.Application"
Set objBook = objExcel.ActiveWorkbook
Set objSheet = objBook.Sheets(1)
( here i need to write code to store the cell vaues in an array for updatingthe database)
Exit Sub
errorhandler:
MsgBox Err.Description
end sub
I am getting a error at objExcel = GetObject("C:\aexcel.xls", "Excel.Application"
Could somebody help me
Help needed urgently