Is there a better option than Getobject to access a .xls?

  • Thread starter Thread starter Dave F
  • Start date Start date
D

Dave F

Hi

Excel '98 & 2002. AutoCAD 2002

I'm running a vba routine within AutoCAD to access the info within a .xls
file.
I'm using Getobject, but have just been told that even though it doesn't
display the spreadsheet, it still loads it into an instance of Excel.

Is this correct?

In AutoCAD VBA there's a command (ObjectDBX) to access other AutoCAD files
databases without loading in an instance.

Is there an equivalent in Excel?

Thanks in advance

Dave F.
 
Dave -

In Excel, you could use Application.Workbooks("Name.xls").Open, but from
AutoCAD you'd have to use GetObject anyway to open a new instance or
access a running instance of Excel.

- Jon
 
If you want to work with the file, unless you write your own file
interpreter, then you need to open excel. If your file is set up like a
database and you just want to retrieve the data, you can treat an excel file
as a database file and use ADO or DAO.
 
Tell me more...
If your file is set up like a database

Do I have to do anything special to do this?
My workbook has a few worksheets with standard columns of numeric numbers.
and you just want to retrieve the data, you can treat an excel file
as a database file and use ADO or DAO.

I have vague memories that ADO is newer than DAO. Correct?
Which is better/faster of the two?

Are they faster than using GetObject, which definately slows my routine
down?

Thanks in advance

Dave F.
 
Back
Top