Jump to content

export a table from cad to excel


Recommended Posts

Posted

dear friends

is there any way to copy and paste a table from cad to excel to do calculations?

Posted

In AutoCAD 2004? I don't think so. Did 2004 even have a "Table" command?

Posted

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.

Posted

dear remark

thanks.i try to find the lisp

Posted

dear remark

i couldn't use the lisp.the error

error: bad argument type: lselsetp nil

please help

Posted

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

Posted

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

Posted

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.

Posted

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

Posted

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.

Posted

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.

Posted

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

Posted (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 by naserrishehri@yahoo.com
Posted

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.

Posted

 

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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...