Column widths change when pasting row in table

jmt356
SilverLounger
Posts: 2389
Joined: 28 Mar 2010, 01:49

Column widths change when pasting row in table

Post by jmt356 »

Please see the attached table. When I try to copy and paste Row 1 into the table or copy and paste Row 1 into a new table, the column widths change. Do they change for you? If so, how can this behavior be stopped?
You do not have the required permissions to view the files attached to this post.
Regards,

JMT

User avatar
HansV
Administrator
Posts: 78531
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Column widths change when pasting row in table

Post by HansV »

When I copy/paste within the same table, the row maintains its width. But when I copy/paste to a new table, it becomes wider.

On the Layout tab of the ribbon, to the right of the Table Design tab, play around with the AutoFit setting in the Cell Size group.
Best wishes,
Hans

User avatar
kdock
5StarLounger
Posts: 720
Joined: 21 Aug 2011, 21:01
Location: The beautiful hills of Western North Carolina

Re: Column widths change when pasting row in table

Post by kdock »

When I copy/paste within the same table, I get the same results Hans reported.

I created a new table and lined up the columns with the original table. I right-clicked on the row below where I wanted the copied row, and chode the option Merge Table. The copied row takes on the formatting of the row above. When I used the option Insert As New Rows, the new row stuck out slightly on the left, all columns seemed to be the same width, and horizontal lines on the new row were thicker.

Just to see what would happen, I copied one of the rows that jutted out to the left and used the Merge Table technique to insert it below a row that didn't jut out, and it took on the same formatting as the row above. If I inserted it below the row that jutted out, the pasted row also jutted out.

Finally, I created a new table with a different width. If I copied and pasted using Merge Table, all was well and it took on the formatting of the new table. If I pasted using Insert As New Rows, it brought the formatting from its source table with it.

So, a whole other way to deal with this is to select the text in the rows without including the row marker outside the last column - so you're just copying the text. Now insert a new row - all cells in the new row should be selected - and paste. This should default to pasting text only.

Judging by the styles in the document, it looks as if this table came from a web page. It also looks as if this could have been a large legal document with everything but this table deleted. Bottom line, it's dragging around a lot of cyber-schmutz.

If I grab the left edge of a single row that has a wider column 1 and drag it to the right to make it match the smaller rows, all the wider columns adjust along with it. But if I grab the right edge of that same column and drag it left, only that row is affected - and none of the shorter rows are affected by any of this. This is not normal behavior for a healthy table.

But you have options now. If it's not practical to create a new table, you can at least copy and paste with some certainty using careful pasting.

Kim
"Hmm. What does this button do?" Said everyone before being ejected from a car, blown up, or deleting all the data from the mainframe.

jmt356
SilverLounger
Posts: 2389
Joined: 28 Mar 2010, 01:49

Re: Column widths change when pasting row in table

Post by jmt356 »

Hans, is there any setting in particular that I should choose in the autofit setting?
Regards,

JMT

User avatar
HansV
Administrator
Posts: 78531
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Column widths change when pasting row in table

Post by HansV »

You'll have to experiment to find out if there is a setting that works for you.
Best wishes,
Hans