naserrishehri@yahoo.com Posted October 18, 2010 Share Posted October 18, 2010 dear friends is there any way to copy and paste a table from cad to excel to do calculations? Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 18, 2010 Share Posted October 18, 2010 In AutoCAD 2004? I don't think so. Did 2004 even have a "Table" command? Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 18, 2010 Share Posted October 18, 2010 I posted a link recently to a lisp routine that will export what appears to be a table (linework and text) to an Excel file. It was called Export Table.lsp and the routine was started by typing the letters ETT at the command line. Quote Link to comment Share on other sites More sharing options...
naserrishehri@yahoo.com Posted October 18, 2010 Author Share Posted October 18, 2010 dear remark thanks.i try to find the lisp Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 18, 2010 Share Posted October 18, 2010 dear remarkthanks.i try to find the lisp It is in this thread. Post #12 by fixo. It was named incorrectly as Import Text when it should have been called Export Text. I did test it and it does work. http://www.cadtutor.net/forum/showthread.php?38705-dwg-to-xls-routine/page2&highlight=Export+table Quote Link to comment Share on other sites More sharing options...
naserrishehri@yahoo.com Posted October 19, 2010 Author Share Posted October 19, 2010 dear remark i couldn't use the lisp.the error error: bad argument type: lselsetp nil please help Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 19, 2010 Share Posted October 19, 2010 I have tested and used the lisp routine with no problem in AutoCAD 2010. Your so called "table" is really just a series of lines and text is it not? If so, then this routine should work unless you are selecting something AutoCAD was not expecting (like a block). Quote Link to comment Share on other sites More sharing options...
naserrishehri@yahoo.com Posted October 20, 2010 Author Share Posted October 20, 2010 dear remark thanks a lot for your lisp.i used it and it was good for well arranged tables but if data in the table had bad arrangement ,then the lisp couldn't work good. kind regards Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 20, 2010 Share Posted October 20, 2010 Sorry but I can't do anything about tables with "bad arrangements". Remember the saying "Garbage in equals garbage out." It stands to reason we should all pay close attention to the way we do things even with CAD. Bad practices did not disappear when CAD came into being unfortunately. Quote Link to comment Share on other sites More sharing options...
naserrishehri@yahoo.com Posted October 20, 2010 Author Share Posted October 20, 2010 dear remark i tried table in the attachment but i didn't get good result. please try that and tell me the reason. sample table.zip Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 20, 2010 Share Posted October 20, 2010 If the above table is an example of a "bad arrangement" what do you expect me to do with it? I'm the Terminator and not a magician. Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 20, 2010 Share Posted October 20, 2010 Alright, I take that back. I am a magician. I was able to produce an Excel file called Sample Table.xls from the lines and text provided in your zip file. I don't know what you did wrong. There are really only two instructions. 1) Put a window around the table. 2) Name the table but do not include the file type. It does work. Go back and try it again. Quote Link to comment Share on other sites More sharing options...
naserrishehri@yahoo.com Posted October 21, 2010 Author Share Posted October 21, 2010 dear remark i did the same as you by acad2004.but the result was an excel file which contain only the first column. kind regards Quote Link to comment Share on other sites More sharing options...
naserrishehri@yahoo.com Posted October 21, 2010 Author Share Posted October 21, 2010 (edited) dear remark the result excel file that i got from "sample table" file is in the attachment. i used the attached lisp to export the table. please check tr.zip ETT.zip Edited October 21, 2010 by naserrishehri@yahoo.com Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 21, 2010 Share Posted October 21, 2010 I never checked the contents of the xls file I created yesterday. When I did go back and look I immediately saw what the problem was so I tried again this morning, several times in fact but could not get the desired results. The best I could do was to fully extract everything in the first column on the left. Each column thereafter, that I tried an extraction on, failed to result in all the values being brought over into Excel. For the moment I am unable to provide you with a solution to the problem. Quote Link to comment Share on other sites More sharing options...
lpseifert Posted October 21, 2010 Share Posted October 21, 2010 try the routine found here http://cadtips.cadalyst.com/ole-files/autocad-excel-interface Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 21, 2010 Share Posted October 21, 2010 try the routine found herehttp://cadtips.cadalyst.com/ole-files/autocad-excel-interface Seems to work as advertised. Note: Have Excel open before trying to extract the data. To run the routine type b2e at the command line then follow the two prompts. It could be improved if the routine asked the user for a file name. Upon first use you're left wondering what just happened. Thanks lpseifert. This should make the OP happy. Quote Link to comment Share on other sites More sharing options...
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.