hungeng Posted July 13, 2013 Posted July 13, 2013 Hi guys! Can anyone help me with a lisp please? I have a polygon. I want to export all the ID, length of sides (line, pline, spline, arc), angle taken of a polygon when i pick on them directly as shown on attached file to excel file or table in autocad. Make sure it works on 3d model as well. Thanks in advance Quote
fixo Posted July 14, 2013 Posted July 14, 2013 Welcome on board hunheng, First try this function to read Excel ADO_XLREAD.LSP then possible to go further Quote
hungeng Posted July 14, 2013 Author Posted July 14, 2013 Thanks Fixo. It is not working with me (Command: demo ; error: bad argument type: stringp nil ). im using cad2007 and excel 2003. Quote
fixo Posted July 14, 2013 Posted July 14, 2013 Thanks Fixo. It is not working with me (Command: demo ; error: bad argument type: stringp nil). im using cad2007 and excel 2003. You can test another one then: XL_READ.LSP Let me know if this read Excel range Quote
fixo Posted July 14, 2013 Posted July 14, 2013 (edited) Here is extended routine XL_READ.LSP Try again XL_READ.LSP Edited July 15, 2013 by fixo Quote
hungeng Posted July 15, 2013 Author Posted July 15, 2013 it is still not working Fixo. When I test the extended routine, nothing happens. Quote
fixo Posted July 15, 2013 Posted July 15, 2013 it is still not working Fixo. When I test the extended routine, nothing happens. hungeng, Try code above again Quote
hungeng Posted July 15, 2013 Author Posted July 15, 2013 hungeng,Try code above again hi fixo. I did try many times but did not see anything (I loaded the lisp by using "AP" then typed "Demo" in the command line). I don't know where the problem is. Is it working on every version of the office? Could u please test it on your computer? and let me know if it works properly. Thanks a lot. Quote
fixo Posted July 15, 2013 Posted July 15, 2013 I tested this code on versions 97-2003 and 2007 both .xls and .xlsx extensions, but my licensed Excel version is 2007 (Student release) It's working good on 2009 through 2014 Acads with no problems, so I cant't help more Quote
hungeng Posted July 15, 2013 Author Posted July 15, 2013 I tested this code on versions 97-2003 and 2007 both .xls and .xlsx extensions,but my licensed Excel version is 2007 (Student release) It's working good on 2009 through 2014 Acads with no problems, so I cant't help more Do u think it can work on AutoCAD 2007 and Excel 2010 or not? 'coz im using these ones in my office but Cad 2007 and excel 2003 at home. Can u please review your code one more time? I really don't know why like this. Quote
hungeng Posted July 15, 2013 Author Posted July 15, 2013 Here is extended routine [ATTACH]42939[/ATTACH] Try again Hi Fixo. I tried your extended routine again. it shows a dialog box to select a excel file but when I type "Sheet name:" , "Address { type like A1:K5 }:". They stop working then. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.