is now part of CreativePro.com!

Copy Data From One Table Into Another with PopTabUnleashed

17

Everyone knows you can copy and paste text from one InDesign document to another, or from another application into your InDesign document. You can even control whether the text formatting is saved or discarded:

  • If the text comes from outside InDesign, you can choose to keep or discard the formatting in the Clipboard Handling pane of the Preferences dialog box.
  • If the text comes from the same or another InDesign document, you can strip out the formatting by choosing Edit > Paste without Formatting.

Unfortunately, these rules don’t fully apply to tabular text (text from one or more table cells). In particular, there is no way to strip out the formatting when you paste tabular data from one InDesign document to another (or one table in your document to another, or even from one part of an InDesign table to another part). That’s a problem, but there’s an easy solution, which I’ll show you in a minute.

First I need to explain one thing quickly: To copy and paste more than one cell of tabular data, you need to:

  1. Select all the cells you want to copy (you can probably just drag over them with the Type tool);
  2. Select one or more cells in the table you want to paste the data into. To make it easy, click inside the upper-left cell in the range with the Type tool (so that the cursor is flashing in that cell) and then press Esc (escape). That’s a shortcut for selecting the cell itself (rather than the text inside the cell).
  3. Paste.

If you copied cells from another program (such as Excel or Word), the formatting is automatically stripped out when you paste into InDesign. That is, the numbers or text from the cell are formatting based on whatever cell formatting already existed in InDesign. (Well, actually, if you have your Clipboard Handling preference set to retain all style formatting, then it really messes up the paste, placing a new table inside the first cell of the table. It’s ugly! Don’t do that.)

However, if you copied the cells from another InDesign table, then when you paste, it takes the formatting along for the ride. You might try to choose Paste Without Formatting, but — oddly — that feature is disabled for tabular data. Oops.

Okay, so here’s the trick: Use the free PopTabUnleashed script, written by Dave Saunders. Dave originally wrote this many years ago, but it still works.

(Remember, to install scripts: Open the Scripts panel from the Window menu; right-click on the User folder inside the panel; select Reveal in Finder/Explorer; place the .jsx script (not a zip file) inside the Scripts Panel folder; return to InDesign and look inside the User folder in the Scripts panel; double-click the script to run it.)

If none of that explanation made sense, here it is in visual form:

Here are two InDesign tables (granted these are really ugly, but I’m just trying to explain something here):

pasting tabular data

After I select the first two rows in the top table and paste them into the first two rows of the second table, you can see that the second table’s formatting is wiped out:

Poptab2

Now, let’s undo, then try it again, this time using the PopTabUnleashed script to do the “pasting”:

pasting with poptabfmclip

Now just the data shows up, formatting the way it should in the second table. Bravo!

David Blatner is the co-founder of the Creative Publishing Network, InDesign Magazine, CreativePro Magazine, and the author or co-author of 15 books, including Real World InDesign. His InDesign videos at LinkedIn Learning (Lynda.com) are among the most watched InDesign training in the world.
You can find more about David at 63p.com

Follow on LinkedIn here
  • Uwe Laubender says:

    Cool. Thank you, Dave!

    But be aware, that inline or custom anchored objects don’t travel over. Technically thiese are part of the formatting information and not part of the pure “contents” property the script is using.

    Same is true when alternative glyphs of a OpenType font are used (even if source and target paragraph style use the same font).

    Uwe

  • Hi David,
    I am gonna give it a try with the latest ID version I have to see it working. (Thanks Dave, and David).

    Though I have used often a manual roundup, of duplicating the table, or rows to be pasted, convert them to tabular text, select them and now I can paste without format* on selected cells.
    And yes, do not forget to select a cell as a starting point, place the text cursor inside it and press ESC key to select it. (When placing, the cells at right and below will be populated).

    (*) I better understand “Paste without formatting” definition, as a pasting where text gets and keeps the current styling.

  • Eugene Tyson says:

    I just convert the source table to text. Copy the the text and paste it into the target table :) using the Paste Without Formatting (CTRL SHIFT V)

    But a script is fun too :D

  • Uwe Laubender says:

    @Eugene:
    your method will preserve anchored objects. So, maybe a script should mimic that method.

    Uwe

  • Uwe Laubender says:

    However: alternative glyphs will not be preserved in that way.

    Uwe

  • Uwe Laubender says:

    Eugene wrote: “I just convert the source table to text.”

    @Eugene: you will run into problems with this method if your source cells contain tabs and/or paragraph returns.

    Uwe

  • Eugene Tyson says:

    There are times when those things are required. It’s not perfect solution. But it’s what I do without a script. The script is a great option.

  • Hopsa says:

    I love all those scripting guys an’ gals!
    Thanks for this one, and thanks in advance!
    ;-)

  • rami khater says:

    Hi Dave
    Amazing thank you very much, i just gave it a try

    best regards and good luck !!
    Rami

  • Nate says:

    Hi David,

    How could I tweak this script so that it could add text from one table to an existing table? At the same time inserting a “space / space” in between each add. I have 30 different .indd files that all have the same table setup (1 header, 2 columns, and 32 rows), each one contains the same information but all in different languages. The first column contains a graphic symbol, the second column contains the text description, each row is a different symbol. I would like to add the translated text from all the other files to the English table so that each row of text would read something like this (English / French / Spanish / Dutch / Russian / etc.)

  • Joe says:

    Hi all,

    I really need this script right now, but haven’t installed since upgrading to CC2017. The file is no longer being hosted on Dave Saunders’ website.

    Anybody know where I can download it?

  • ben says:

    I am als wondering if there is an alternative for Indesign CC. The old one doesn’t work anymore… anybody have any information?

  • Joe says:

    It’s 2023 and I am amazed that we still can’t paste without formatting in InDesign. If anyone is looking for the “Pop Tab Unleashed” script, you can download it here:

    https://www.dropbox.com/s/l9m8u5nmo8t6sfq/PopTabUnleashed.jsx.zip?dl=0

    I can confirm that it works on InDesign 2023 (v. 18.1).

  • >