Jump to content

Opening Excel from AutoCAD


LosGirk

Recommended Posts

It has something to do with the shell command. I haven't gotten it working, but I haven't put much time into figuring it out either. If I understand correctly, this other thread does what you're wanting, but I can't make it work with Excel some reason.

Link to comment
Share on other sites

Simply:

(if (setq excel (vlax-get-or-create-object "Excel.Application"))
 (vlax-put-property excel 'visible :vlax-true)
 (prompt "\nUnable to interfere with excel application.")
)

Although you would have to release the excel application object in the end.

 

EDIT: Damn, Lee was faster - sorry. :ouch:

Link to comment
Share on other sites

Actually, this is better:
(startapp (vl-registry-read (strcat "HKEY_CLASSES_ROOT\\" (vl-registry-read "HKEY_CLASSES_ROOT\\.xls") "\\shell\\new\\command")))

 

Learned something new today, you have my thanks! :)

Link to comment
Share on other sites

Actually, this is better:
(startapp (vl-registry-read (strcat "HKEY_CLASSES_ROOT\\" (vl-registry-read "HKEY_CLASSES_ROOT\\.xls") "\\shell\\new\\command")))

 

 

 

:thumbsup:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...