LosGirk Posted December 4, 2017 Posted December 4, 2017 Is there a way to just open the Excel program and not a specific file from within AutoCAD? Thanks Quote
benhubel Posted December 4, 2017 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
LosGirk Posted December 4, 2017 Author 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
Lee Mac Posted December 4, 2017 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
benhubel Posted December 4, 2017 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
Grrr Posted December 4, 2017 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
Lee Mac Posted December 4, 2017 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
LosGirk Posted December 4, 2017 Author Posted December 4, 2017 Thanks everyone! You guys are so awesome. Quote
Grrr Posted December 4, 2017 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
rlx Posted December 5, 2017 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
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.