
Import from Excel 97 to Access 97 table
Hi Yener,
You can link to an Excel spreadsheet. Also, through Automation, you can
open a workbook and then use Cells(x,y) method to access individual cell
values. This example that I posted just now might give you a start
'************* Code Start ************
Sub AutomateExcel()
' This procedure is a brief sample showing
' how to automate Excel.
' Remember to set a reference to the most current available
' Microsoft Excel object library.
' Declare object variables.
Dim appXl As Excel.Application
Dim wrkFile As Excel.Workbook
Dim wks As Excel.Worksheet
' Set object variables.
Set appXl = New Excel.Application
Set wrkFile = appXl.Workbooks.Open("c:\temp\test.xls")
' Display Excel.
appXl.Visible = True
For Each wks In wrkFile.Worksheets
Debug.Print wks.Name
Next wks
MsgBox "At this point Excel is open and displays a document." & Chr$(13)
& _
"The following statements will close the document and then close
Excel."
' Close the file.
wrkFile.Close
' Quit Excel.
appXl.Quit
' Close the object references.
Set wrkFile = Nothing
Set appXl = Nothing
End Sub
'************ Code End ************
HTH
--
Dev Ashish (Just my $.001)
---------------
The Access Web ( http://home.att.net/~dashish )
---------------
:How can I write in a table field of an Access database from Excel?
:
:It would be nice if little programming was necessary. For instance a direct
:connection, maybe OLE2?
:If programming is neseccary, that is also no problem. I just want to know
:how it is done.
:Do you have suggestions?
:
:Yener
: