
|
X L
H E L P
X L
H E L P
X L
H E L P
|
|
XL Help
If you are experiencing problems with XL, please take a look at some of the solutions below. If this does not solve your problem, please see the email link at the bottom of the page.
The lines to edit inside the XL.lsp program look like this: ((findfile (strcat sysDrive "\\Program Files\\Microsoft
Office\\Office\\Excel8.olb"))) Let's disect it: The FINDFILE function searches autocad's search path for a file. It returns the file name if found, and returns nil if not found. The search paths can be found in the TOOLs drop down menu. Go to PREFERENCES or OPTIONS depending on your version. Go to the FILES tab and click the + sign in front of "SUPPORT FILE SEARCH PATH". Here you will see the search paths listed. The STRCAT function concatenates strings. (strcat "A" "B") would return "AB". The SYSDRIVE function returns the drive letter of the drive where the system files are installed. This is usually the same drive the microsoft programs are installed. The PATH is in quotes preceding the file name. Autolisp uses double "\" marks to indicate one "/". Don't worry about it just take my word for it. Notice the different paths for the different versions of Excel. The last path, if I remember correctly is the default install directory for Excel 2005. The FILENAME is located after the last "\\". These are the Excel Object Libraries. Notice the different names used for each version. Sometimes the library is a OLB file and sometimes it is inside the EXE file. Go figure. Okay.......Now what? First of all, search your hard drive for OLB files. If you find one, make sure it is one of the OLB files listed above. (Excel8.olb, Excel9.olb, or Excel10.olb) Change the path listed above to match the path you found the OLB file in. Reload XL and try again. Secondly, do the exact same thing as before with the OLB files except look for EXCEL*.exe. If you find one, change the path listed above to match the path you found the EXE file in and change the filename to match the one you found. Reload XL and try again.
FYI - You can determine if the FINDFILE function is finding the Excel Object Library by using the FINDFILE function on the command line. Type your path and file name like the example below and press enter. (findfile "C:\\Program Files\\Microsoft Office\\Office\\Excel.exe") If it returns the file name, it found the file. If it returns NIL, the file was not found. Keep trying. Important note: This program was very difficult to write. There are no books (to my knowledge) to research accessing Excel objects via Visual Lisp. It was trial and error. Very fustrating. I talked with Bill Kramer at Autodesk and he suggested using the Excel macro recorder to figure out what objects were being accessed. This was an excellent idea but, then he told me to "Guess" (that's right...he said guess) how to convert the VB code to Visual Lisp. This was no fun at all as you could imagine. I spent hours and hours attempting to access one property after another guessing at the syntax. For this reason I do not program custom Visual Lisp programs for Excel/AutoCAD without a substantial charge for the aggravation of guessing. You may then still have trouble talking me into it, BUT, this does not mean I will not fix a problem with the XL program if you find one. Another note: There is a new program on my web site called GETCELLS. This is a function you can use inside your own programs to get data from excel into a list for you to manipulate. If you have some programming skills it should be self explanitory (after reading the notes inside the GETCELLS program). If you still have problems, email me here. If you have any questions about the program click here. All questions/complaints/suggestions should be sent to JefferyPSanders.com Last Updated September 28th, 2008 Copyright 2002-2008 JefferyPSanders.com. All rights reserved. |