Article ID: 190195 - Last Review: March 2, 2005 - Revision: 2.3 How To Extract Information from Excel Sheet with DAO
This article was previously published under Q190195 On This PageSUMMARY
The Excel ISAM driver does not dynamically convert datatypes.
MORE INFORMATION
If there is a column in your Excel spreadsheet that contains both text and
numbers, the ISAM will not be able to correctly interpret which datatype it
should be. Make sure that all the cells in a column are formatted to
be the same datatype. For example, you might have following data in four
columns in an Excel sheet:
male female children teens 11 cc 78 ee 22 xx 33 ff 45 uu 56 oo If you try to read the data through ISAM driver against the whole sheet, you will get the null values for first row. If you want to avoid this, create named ranges: one containing only the header information and another containing the data information. For example: named range 'myRange1' : male female children teens named range 'myRange2' : 11 cc 78 ee 22 xx 33 ff 45 uu 56 oo Now you can connect to Excel and request information only from the particular named range. However, in one range, a particular column can contain only one type of data. How to Create a RangeFollow these steps in order to create a range:
To retrieve your data, use the range name you just created for the table name in your select statement. Excel Steps
Visual Basic Steps
11 cc 78 ee 22 xx 33 ff 45 uu 56 oo REFERENCES
Please refer to the documentation for how to connect to Excel through DAO.
Another good reference will be the upcoming ADO->Excel reference.
APPLIES TO
| Other Resources Other Support Sites
CommunityGet Help NowArticle Translations
|






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email
Back to the top
