LISP TO OPEN EXCEL

Discussion in 'AutoCAD' started by Mike Mattson, Nov 23, 2004.

  1. Mike Mattson

    Mike Mattson Guest

    I'm looking for a lisp routine that will start Excel and open a file in the
    current drawing directory with the current file's prefix and the '.csv'
    extension. Any help would be appreciated. Thanks!

    Mike Mattson
     
    Mike Mattson, Nov 23, 2004
    #1
  2. (defun c:whatever ()
    (setq dnme (getvar "DWGNAME"))
    (setq dpth (getvar "DWGPREFIX"))
    (setq fnme (strcat dpth dnme))
    (setq file2open (strcat fname ".csv"))
    (startapp "path to excel" file2open)
    (princ));;

    I think this might work...if not, its a start. Read about the startapp function using visual lisp help file. It should help you out a little.
     
    civilychallenged, Nov 23, 2004
    #2
  3. Mike Mattson

    ECCAD Guest

    ECCAD, Nov 23, 2004
    #3
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.