Openning excel from autocad...

Discussion in 'AutoCAD' started by Devin, Dec 31, 2003.

  1. Devin

    Devin Guest

    Is there a way to open an excel doc from inside autocad using programming
    code?

    TIA,

    Devin
     
    Devin, Dec 31, 2003
    #1
  2. Devin

    Jeff Mishler Guest

    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
     
    Jeff Mishler, Dec 31, 2003
    #2
  3. Devin

    BillZ Guest

    (startapp "C:/Program Files/Microsoft Office/Office10/excel.exe"
    "g:/2002/lists/obcolcod.xls")
     
    BillZ, Dec 31, 2003
    #3
  4. Devin

    Dave Guest

    Right on on Bill!

    Dave
     
    Dave, Dec 31, 2003
    #4
  5. Devin

    Jeff Mishler Guest

    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
     
    Jeff Mishler, Dec 31, 2003
    #5
  6. Devin

    Dave Guest

    Dave, Dec 31, 2003
    #6
  7. Devin

    mark Guest

    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\\" "")))
     
    mark, Dec 31, 2003
    #7
  8. Devin

    Devin Guest

    That's it, thanks you guys!
     
    Devin, Dec 31, 2003
    #8
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.