Jump to content

Recommended Posts

Posted

Hi, I'm importing tables from excel pasting them as "autocad entities".
Is there a way to make the row height and column width adjust to the text content?
In excel it's a very trivial operation and the source excel table is formatted like this, I can't do the same operation in autocad.
Regards

Posted

Sorry, in the meantime I found this discussion to be a solution

 

Posted (edited)

If you want to resize a column to suit the text one of the things you can do is look at all the values in that column and get the Strlen this is number of characters, you can then use the num+2 * textht * fuzzfactor for width. Before you do any widths you need to set Text height and Vert & Hor Cell margin. The margin is say * 0.5 textht.

 

Another is you can read a Excel direct so get stuff like widths and text height and make the table to suit. Thats is how I would approach. Or I decide the values to be used then read the excel may want a different text height ta what is in Excel.

 

So yes it is possible. So maybe start with reading cells from Excel. I have posted this many times, which has all the defuns you need to read Excel. So have a go. Same with make table example code. It has read column width. Saved latest version to downloads.

Edited by BIGAL
Posted

Thanks, I will try to consider what you ask....for urgency the solution I found is sufficient, with further small adjustments by hand.
I conclude considering that Autocad tables would be a very powerful tool, but their management is really not very "userfrindly"

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