Corny
asked on
How do I get Fields from an Excel File
I have opened Excel files as database files before, but I used row 1 cells as the field names.
Example:
ExcelFile = "c:\Bin3\AS400FeedFormulat ionsDownlo ad-6.xls"
Set db = DBEngine.Workspaces(0).Ope nDatabase( ExcelFile, False, False, "Excel 8.0; HDR=YES;")
WorkSheetName = "Sheet1"
Set rs = db.OpenRecordset(WorkSheet Name & "$", dbOpenTable)
Do Until rs.EOF
With rs
.Edit
E(R, 1) = !Location
etc..etc
'---------------
The !Location is the "header" on column 1 , row 1. I'm asking if column1, row1 has no text, what do I use for fields?
Example:
ExcelFile = "c:\Bin3\AS400FeedFormulat
Set db = DBEngine.Workspaces(0).Ope
WorkSheetName = "Sheet1"
Set rs = db.OpenRecordset(WorkSheet
Do Until rs.EOF
With rs
.Edit
E(R, 1) = !Location
etc..etc
'---------------
The !Location is the "header" on column 1 , row 1. I'm asking if column1, row1 has no text, what do I use for fields?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER