Openning excel from autocad...

Devin

Usenet Archive
Joined
Sep 27, 2001
Messages
342
Reaction score
0
Is there a way to open an excel doc from inside autocad using programming code?

TIA,

Devin
 
Yes. And read from it. And write to it. And create a new worksheet. And save it. And close it.

There, that about cover it? ;-)

Happy New Year,
Jeff
 
(startapp "C:/Program Files/Microsoft Office/Office10/excel.exe" "g:/2002/lists/obcolcod.xls")
 
And more specifically, if you want to do more than ust open it, see the post made on 4/29/03 by Marc'Antonio Alessi. He posted some excellent Excel linking routines for use in vlisp.

HTH,
Jeff
 
you might have to check to see where excel.exe is, using something like ...

(if (member "EXCEL.EXE" (mapcar 'strcase (vl-registry-descendents "HKEY_CLASSES_ROOT\\Applications\\")))

and then ...

(setq apl "HKEY_CLASSES_ROOT\\Applications\\Excel.exe\\Shell\\" exe (vl-registry-read (strcat apl "Edit\\Command\\" "")))

or ...
exe (vl-registry-read (strcat apl "Open\\Command\\" "")))
 

Latest threads

Back
Top