[Search tip detail and code files using keywords, tip number, author name, etc ]
 
    For tip to function correctly, you must ensure that the downloaded file name matches the file name
    displayed in the Rename File To field. Please rename downloaded files when necessary.
Get Excel Data
Tip# 2038 By Jeff Sanders On 01-Jun-2005
4
Rated By 1 users Downloaded : 2587
Categories : Import, OLE Files
Software type : AutoCAD
Rename File To : Tip2038: GETCELLS.lsp
Obtain data from an Excel spreadsheet

Get Excel Data
Jeff Sanders supplied Get Excel Data (Tip #2038), which is a wonderful utility for programmers to obtain data from an Excel spreadsheet. The self-contained utility is supplied in a single LSP file and contains the definition of a function named getCells. This function has three parameters. The first is a list of strings containing the cell names you want to read, e.g., A1, A2, B1 and B2. The second parameter is the file name of the XLS spreadsheet. The full path and file extension should be supplied, as in C:myFiles heData.XLS. The last parameter is the sheet name, e.g., SHEET1. When successful, the utility returns an association list with the cell number as the key to the contents of the cell as the second member (access using CADR with the result from ASSOC of the cell name in the data list). Jeff hopes others can use this routine to quickly get into Excel and use it as a data engine for AutoCAD. Thanks, Jeff.

 

 

Average Rating:
4


User comments
Comment by C,NANJAPPA
Posted on 2013-11-14 01:44:49
please advise how to use this lisp. whats the command name
Comment by C,NANJAPPA
Posted on 2013-11-14 01:45:05
please advise how to use this lisp. whats the command name


Log In