LosGirk Posted December 4, 2017 Share Posted December 4, 2017 Is there a way to just open the Excel program and not a specific file from within AutoCAD? Thanks Quote Link to comment Share on other sites More sharing options...
benhubel Posted December 4, 2017 Share Posted December 4, 2017 I don't know details, but I think that this thread can get you started. http://www.theswamp.org/index.php?topic=38561.msg436891#msg436891 Quote Link to comment Share on other sites More sharing options...
LosGirk Posted December 4, 2017 Author Share Posted December 4, 2017 Thanks, but I need to just open Excel as if I launched the Excel program from an icon. I don't want to open an already existing file. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 4, 2017 Share Posted December 4, 2017 (setq xls (vlax-create-object "excel.application")) (vlax-put-property xls 'visible :vlax-true) Be sure to release the xls object when finished. Quote Link to comment Share on other sites More sharing options...
benhubel Posted December 4, 2017 Share Posted December 4, 2017 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. Quote Link to comment Share on other sites More sharing options...
Grrr Posted December 4, 2017 Share Posted December 4, 2017 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. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 4, 2017 Share Posted December 4, 2017 Actually, this is better: (startapp (vl-registry-read (strcat "HKEY_CLASSES_ROOT\\" (vl-registry-read "HKEY_CLASSES_ROOT\\.xls") "\\shell\\new\\command"))) Quote Link to comment Share on other sites More sharing options...
LosGirk Posted December 4, 2017 Author Share Posted December 4, 2017 Thanks everyone! You guys are so awesome. Quote Link to comment Share on other sites More sharing options...
Grrr Posted December 4, 2017 Share Posted December 4, 2017 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! Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 4, 2017 Share Posted December 4, 2017 You're welcome! Quote Link to comment Share on other sites More sharing options...
rlx Posted December 5, 2017 Share Posted December 5, 2017 Actually, this is better:(startapp (vl-registry-read (strcat "HKEY_CLASSES_ROOT\\" (vl-registry-read "HKEY_CLASSES_ROOT\\.xls") "\\shell\\new\\command"))) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.