Hola, gracias por responder, este es el codigo, lo tebgo con una cadena por defecto pero aun asi no me lee el archivo.
Código vb:
Ver originalFunction excel_access(FilIni As Integer, ColIni As Integer, CantFil As Integer, TabNom As String, NumPla As Integer, numEst As Integer)
'Variables para leer excel
Dim db As Database
Dim rs As Recordset
Dim Obj_Excel As Object
Dim Obj_Hoja As Object
Dim cn_Ado As Connection
Dim Fila_Actual As Integer
Dim Columna_Actual As Integer
Dim contador As Integer
Dim FACTOR As Double
Dim Dato As Variant
Screen.MousePointer = 11
'Nueva instancia de Excel
Set Obj_Excel = CreateObject("Excel.Application")
' Abre el libro de Excel
Obj_Excel.Workbooks.Open Filename:="C:\Plantas\6001"
' si es la versión de Excel 97, asigna la hoja activa ( ActiveSheet )
If Val(Obj_Excel.Application.Version) >= 8 Then
Set Obj_Hoja = Obj_Excel.ActiveSheet
Else
Set Obj_Hoja = Obj_Excel
End If
Set db = CurrentDb
Set rs = db.OpenRecordset(TabNom, dbOpenDynaset)
For Fila_Actual = FilIni To CantFil
'Nuevo registro
contador = 0
For Columna_Actual = ColIni To ColIni + 9
rs.AddNew
' Va leyendo los datos de la celda indicada
Dato = Trim$(Obj_Hoja.Cells(Fila_Actual, ColIni - 1))
FACTOR = contador / 10
rs("estFactor") = Dato + FACTOR
Dato = Trim$(Obj_Hoja.Cells(Fila_Actual, Columna_Actual))
'RS("estDecimal") = contador
If IsNull(Dato) Or Dato = "" Then
rs("estValor") = 0
Else
rs("estValor") = CLng(Dato)
End If
rs("numEstanque") = numEst
rs("idPlanta") = NumPla
rs.Update
contador = contador + 1
Next
Next
Obj_Excel.Workbooks.Close
Screen.MousePointer = 0
End Function