I am trying to create a data link file from a excel spreadsheet and it is
not working. I can get it to come up in the dbConnect manager but all the
table buttons are grayed out. Am I doing something wrong or do I have to
format my spreadsheet differently. I have opened a couple of the sample
files but they all use Access files and not Excel files.
It's difficult to tell if you are doing something wrong without knowing
what you did. How did you set up your Excel spreadsheet? How did you set
up the data link form AutoCAD?
From the documentation of a library I wrote:
You must set aside an area in which the data is to be kept. This may be an
area in a worksheet that also contains other information, but it is
preferable to put the data in a worksheet of its own and put any formulas
that refer to that data in another worksheet.
Excel does not report the type of the data to the database driver. The
database driver must scan a part of the data area to determine whether the
data is numbers, text strings, dates, or whatever. Although it does not
affect the database driver, it is a good idea to format the columns with
the appropriate data type just for visual presentation,
It is possible but very difficult to work with the data without assigning
names to the columns. It is definitely best to format the first row of the
data area as text and enter column names in that first row.
You may enter data in the appropriate places in Excel if you wish. Never
enter formulas in the data area.
Assign a "table name" to the data area, which will be the name that you
will use in your SQL statements where the table name goes. Highlight the
column names and at least one row's worth of the cells below them
(including all data you have pre-entered). Pick "Insert" "Name" "Define"
and enter a name. (Note: You can check on your version of MDAC using the
Component Checker available at http://www.microsoft.com/data, or you can
update your MDAC from the files at that site. If you are using MDAC 2.5 or
later, the named area will expand automatically when you add new data
through SQL. If you are using MDAC before 2.5, you must highlight the
entire area that you will be using for data, now and in the future).
Member of the Autodesk Discussion Forum Moderator Program
Please do not email questions unless you wish to hire my services
In article , David
> I am trying to create a data link file from a excel spreadsheet and it is
> not working. I can get it to come up in the dbConnect manager but all the
> table buttons are grayed out. Am I doing something wrong or do I have to
> format my spreadsheet differently. I have opened a couple of the sample
> files but they all use Access files and not Excel files.