[Solved] Copy-and-paste tables within tables (nested table)

Discuss the word processor
Post Reply
davescafe
Posts: 3
Joined: Fri Feb 15, 2008 6:29 pm

[Solved] Copy-and-paste tables within tables (nested table)

Post by davescafe »

Question: How to copy-and-paste tables within tables (embedded tables)?

Issue: When I copy-and-paste a table (e.g. Table 1) within another table (e.g. Table 2) , rather than embedding Table 1 into Table 2, OOo assumes that I want to paste the *content* of Table 1 into Table 2.

Environment: OpenOffice.org Writer 3.1.1 running on Ubuntu Linux 9.10

Details: I have created a document containing twelve tables. Each table represents a month in the year. I want to be able to organize certain months by embedding them in a table. For example, I would like a table that has two cells. Embedded in cell 1 would be the table for the month of March, and embedded in cell 2 would be the table for the month of April.

I would appreciate any help or suggestions on how to do this.

Dave
Last edited by davescafe on Thu Mar 25, 2010 4:11 pm, edited 1 time in total.
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: How to copy-and-paste tables within tables (embedded tab

Post by acknak »

The only way I know of to paste an entire table inside another table is to include some text before and after the table when you copy it, then delete the extra text after you paste.

Do you really need a nested table? If you just need to get the two months side-by-side, you might be able to use columns.
AOO4/LO5 • Linux • Fedora 23
User avatar
Hagar Delest
Moderator
Posts: 33659
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: How to copy-and-paste tables within tables (embedded tab

Post by Hagar Delest »

acknak wrote:The only way I know of to paste an entire table inside another table is to include some text before and after the table when you copy it, then delete the extra text after you paste.
+1. Just to add that by "text", it can be an empty paragraph before the table.

Thanks to add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
davescafe
Posts: 3
Joined: Fri Feb 15, 2008 6:29 pm

Re: How to copy-and-paste tables within tables (embedded tab

Post by davescafe »

Hagar de l'Est wrote:
acknak wrote:The only way I know of to paste an entire table inside another table is to include some text before and after the table when you copy it, then delete the extra text after you paste.
+1. Just to add that by "text", it can be an empty paragraph before the table.

Thanks to add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.
Thank you acknak and Hagar de l'Est. Including text as you described resolved the issue. I had not considered using columns, and that is something I will explore as well.

These are the steps I am following:
  • 1) Create Table 1
    2) Add a character of text prior to Table 1 (e.g. "a")
    3) Create Table 2
    4) Copy the text and Table 1 and paste into Table 2
    5) Delete the text
This method does result in a un-deletable empty paragraph below Table 1 after I have copied-and-pasted Table 1 into Table 2. I cannot remove this paragraph using <Ctrl><Shift><Delete> (as described in this thread: http://user.services.openoffice.org/en/ ... 360#p46590)

I have tried deleting the empty paragraph under Table 1 prior to copy-and-pasting it, but if I do so, then I am not able to copy follow the steps to embedding Table 1 into Table 2. Specifically, if I remove the empty paragraph under Table 1, then I am unable to select any more than Table 1 for copying. I cannot select the text prior to Table 1 as well as Table 1, but only Table 1 itself. This is not a problem to me since I am making Table 2 borderless so the empty paragraph will not be noticeable.
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: [Solved] copy-and-paste tables within tables (embedded t

Post by acknak »

I don't think there is any way to remove the empty paragraph below the inner table. You can create the inner table, in place, and avoid the extra paragraph, but you can't paste the inner table and avoid it.

I usually work around it, if necessary, by adding a hidden paragraph field to hide the empty paragraph: Insert > FIelds > Other > Functions > Type: Hidden Paragraph, Condition: 1 (or True). To actually hide the hidden paragraph, you must have View > Hidden Paragraphs: NO

Relevant issues (duplicates): http://qa.openoffice.org/issues/buglist ... 6014,40050
AOO4/LO5 • Linux • Fedora 23
davescafe
Posts: 3
Joined: Fri Feb 15, 2008 6:29 pm

Re: [Solved] copy-and-paste tables within tables (embedded t

Post by davescafe »

acknak wrote:I don't think there is any way to remove the empty paragraph below the inner table. You can create the inner table, in place, and avoid the extra paragraph, but you can't paste the inner table and avoid it.

I usually work around it, if necessary, by adding a hidden paragraph field to hide the empty paragraph: Insert > FIelds > Other > Functions > Type: Hidden Paragraph, Condition: 1 (or True). To actually hide the hidden paragraph, you must have View > Hidden Paragraphs: NO

Relevant issues (duplicates): http://qa.openoffice.org/issues/buglist ... 6014,40050
Your advice on hidden paragraphs and your instructions on how to do it are very helpful. I have followed the steps and it works beautifully.

Thanks again,

Dave
Boloney
Posts: 1
Joined: Wed Aug 11, 2010 6:26 pm

Re: [Solved] Copy-and-paste tables within tables (nested tab

Post by Boloney »

I searched a very long time to copy a table within another table cell. I was using a table as a layout to create little cards. Inside every card, i wanted to create another table with a title and two columns. Creating the first one was perfect but then, impossible to just copy and paste my beautiful table inside all the other cells of the table layout. I spent hours looking everywhere while there was a very very simple solution just there with a simple ctrl F3. Yep, His name is: Autotext

So here i share the procedure to the world community. I hope it will save to everyone a lot of time:

1. Create your table template with ctrl F2, set the number of columns and lines and the size of each one as usual.
2. When your template table is ready. click on the first cell and press ctrl F12 again to create a table within the cell
3. Once you have set up your table as you like it, select it by dragging your cursor from upper left to down right, it should be in
grey.
4. Press ctrl F3 or go to the menu/edit/AutoText, here is your friend
5. In the new window, select "My autoText"
6. Type a name for your new text in the infield "name" then press "AutoText" at the right of the window and select "New". Name your new AutoText
7. Close the window and click in the second cell of your layout
8.Press ctrl F3 and click on your new Autotext
9. that's it

Hope it will help
OpenOffice 3.2.1
Windows XP
Post Reply