Jump to content

LISP to extract attributes into a excel already made


Recommended Posts

Posted (edited)

hi, my problem is that i want to get the information of a several number of Autocad files into an Excel file that i´ve already made previously(becouse in that Excel file, i have excel´s macros to work easier) , and the code that i´m going to show now, opens a new Excel and that´s what i don´t want to.

I have the excel file that i want to work with, in a route like  "C:\Users\Desktop\actualiza.xlsm"

Thanks beforehand

 

(if (and Dwg$lst (apply 'or (apply 'append (mapcar 'cadr Dwg$Lst))))
   (progn

      (setq xlApp (vlax-get-or-create-object "Excel.Application")

                xlCells (vlax-get-property
                               (vlax-get-property
                                  (vlax-get-property
                                     (vlax-invoke-method
                                         (vlax-get-property xlApp "Workbooks")
                                          "Add"
                                     )
                                     "Sheets"
                                  )
                                  "Item" 1
                              )
                              "Cells"
                           )
)

 

 

Edited by rkmcswain
added [CODE] tags

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...