Hi co_vs_gio,
You can open up GetExcel.lsp in NotePad.exe if you just need to view the AutoLISP code.
Near the top of the file you will see these two example functions that have ";" as the first character of the line.
This means that AutoLISP treats the rest of the line as nothing more than a comment.
So there is really not a function called Get-Example or Put-Example, it is for use as an example only.
; Function example of usage:
; (defun c:Get-Example ()
; (GetExcel "C:\\Folder\\Filename.xlsx" "Sheet1" "L30");<-- Edit Filename.extension
; (GetCell "H21");Or you can just use the global *ExcelData@ list
; );defun
; Function example of usage:
; (defun c:Put-Example ()
; (OpenExcel "C:\\Folder\\Filename.xlsx" "Sheet1" nil);<-- Edit Filename.extension
; (PutCell "A1" (list "GP093" 58.5 17 "Base" "3'-6 1/4\""));Repeat as required
; (CloseExcel "C:\\Folder\\Filename.xlsx");<-- Edit Filename.extension
; (princ)
; );defun
In the above example code where you see:
; (GetExcel "C:\\Folder\\Filename.xlsx" "Sheet1" "L30");<-- Edit Filename.extension
The "C:\\Folder\\Filename.xlsx" needs to be revised to be the actual Windows Folders and the name of the Excel filename.
The "Sheet1" needs to be the actual Tab name in the Excel file that you are needing.
The "L30" means column "L" and row "30", that you are reading up to.
; GetExcel - Stores the values from an Excel spreadsheet into *ExcelData@ list
; Syntax: (GetExcel ExcelFile$ SheetName$ MaxRange$)
; Example 1: (GetExcel "C:\\Folder\\Filename.xlsx" "Sheet1" "L30")
; Example 2: (GetExcel "C:\\Folder\\Filename.xlsx" (list "Sheet1" "Sheet2") (list "L30" "H747"))
I hope this helps explains your questions.
Terry
@co_vs_gio wrote:
Hello Terrycadd!
I downloaded the Getexcel R10 lisp -> when using the lisp an error occurred. I am using Cad2007 and Excel 2013
I tried to load (AP) lisp -> enter the command GET-EXAMPLE and PUT-EXAMPLE : on my laptop and PC, both with the same error:
"Command: ap
APPLOAD getxcel.lsp successfully loaded.
Command:
Command: Get-Example Unknown command "GET-EXAMPLE". Press F1 for help.
Command: PUT-EXAMPLE
Unknown command "PUT-EXAMPLE". Press F1 for help."
Then: I tried downloading the R4 version and got the same error ☹️
I read that everyone uses the lisp OK, I am an armateur so I don't know which step I did wrong. I hope you guys can help.
Thank you very much!