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