I’ve been working on a general purpose function for (Excel to AutoCAD) and (AutoCAD to Excel) applications. I owe a lot of credit to Gile here at the Swamp for his AutoLISP functions ColumnRow, Alpha2Number and Number2Alpha. In this version I did away with the VBA concept and rewrote it using Vlisp functions instead.
For you beta testers, here’s how easy it works.
[The Get Part]
GetExcel - Stores the values from an Excel spreadsheet into *ExcelData@ list
___Syntax: (GetExcel ExcelFile$ SheetName$ MaxRange$)
___Example: (GetExcel "C:\\Folder\\Filename.xls" "Sheet1" "L30")
GetCell - Returns the cell value from the *ExcelData@ list
___Syntax: (GetCell Cell$)
___Example: (GetCell "H15")
[The Put Part]
OpenExcel - Opens an Excel spreadsheet
___Syntax: (OpenExcel ExcelFile$ SheetName$ Visible)
___Example: (OpenExcel "C:\\Folder\\Filename.xls" "Sheet1" nil)
PutCell - Put values into Excel cells
___Syntax: (PutCell StartCell$ Data$) or (PutCell StartCell$ DataList@)
___Example: (PutCell "A1" (list "GP093" 58.5 17 "Base" "3'-6 1/4\""))
CloseExcel - Closes Excel session
___Syntax: (CloseExcel ExcelFile$)
___Example: (CloseExcel "C:\\Folder\\Filename.xls")
Also, CAB if you’re out there; remember the thread discussion on getting my DrawExcel.lsp function to work on your system? I revised it also with these functions. It’s out there on the
AutoLISP Exchange @
http://web2.airmail.net/terrycad.
Upcoming Bull Frog.