• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

Is there a way to "autofit" an InDesign table's columns to fit their content?

New Here ,
Sep 29, 2009 Sep 29, 2009

Copy link to clipboard

Copied

Am I being dense about this? I've looked through all the help documentation, searched online in various forums, blogs, etc...I can't find anything about being able to autofit a table's column to fit its content.

This type of thing is a piece of cake in Excel...just double-click the border between the cells and it'll autofit.

But, in InDesign (as far as I can tell), it's an entirely manual process involving zooming in and manually adjusting the borders between cells until the red table cell overflow circle goes away.

Not fun when you have a half dozen tables on a single page...and then eight additional pages with similar numbers of tables.

Is there any solution to doing this? A script? A plugin? The next version (whenever it comes out)? Something else?

Thanks in advance for any help,

Doug Thompson

Manager of Web and Electronic Communications

Ohio Wesleyan University

TOPICS
How to

Views

52.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 29, 2009 Sep 29, 2009

Copy link to clipboard

Copied

Afraid not.

What I do is select a common row and that will give you the width. Then I copy the width of the row size. In other tables of the same layout I paste this number into the row width.

Height is easy enough, select the whole table, set it to be exactly 1.5mm then select the EXACTLY option and it all auto fits into the right sized rows.

But column width is different. The only way I've found is to copy the row width as said above.

OR draw guides where you want the table widths to be, that works as you can just snap the cursor to the guide, you're done in a snap.

Tables are pretty weak in InDesign.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Sep 29, 2009 Sep 29, 2009

Copy link to clipboard

Copied

Eugene Tyson wrote:

Afraid not.

What I do is select a common row and that will give you the width. Then I copy the width of the row size. In other tables of the same layout I paste this number into the row width.

Height is easy enough, select the whole table, set it to be exactly 1.5mm then select the EXACTLY option and it all auto fits into the right sized rows.

But column width is different. The only way I've found is to copy the row width as said above.

OR draw guides where you want the table widths to be, that works as you can just snap the cursor to the guide, you're done in a snap.

Tables are pretty weak in InDesign.

Add your request to many others at:

https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

Regards,

Peter

_______________________

Peter Gold

KnowHow ProServices

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 29, 2009 Sep 29, 2009

Copy link to clipboard

Copied

Oh I've been there Peter.

I have many requests logged with Adobe.

Even simple calculations for tables would be nice.

Tables could be so much easier than they are now.

You can't even go from Cell Options to Table Options dialog box, two sep short cuts to get there. Frustrating.

Even for doing accounting books, like annual reports, a simple double underline button, or single underline button or something. It's so petty using tables it takes an age to do a book that contains mainly tables.

Perhaps they need a new plugin/application just for doing tables, like an excel type program that you link your files from?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 29, 2009 Sep 29, 2009

Copy link to clipboard

Copied

Eugene Tyson wrote:

Perhaps they need a new plugin/application just for doing tables, like an excel type program that you link your files from?

Oh please, NO! Let's not go back to Pagemaker's Table Editor. You can link Excel now...

All of that aside, I doubt you'd find anyone who hates tables in ID more than me. I've done the Table styles demos and exercises, and the samples always work flawlessly. As soon as I try to do something in the real world with my own oddly formatted tables, though, everything falls apart, and my last two big projects have been very heavily tabled. Grrrrrr.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 29, 2009 Sep 29, 2009

Copy link to clipboard

Copied

Same here Peter, although I know you can link excel tables flawlessly, I often have to edit the text in table, actually someone else might do it too. If it's linked they wouldn't know. And when I update all the links I lose out on the changes.

It just needs to sync more. I never used Pagemakers Table Editor, but I sense it wasn't good.

I need a Table Panel that has everything. Selecting those strokes of cells is a 'mare for starters. It just needs to be made simpler.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 29, 2009 Sep 29, 2009

Copy link to clipboard

Copied

Amen.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Sep 29, 2009 Sep 29, 2009

Copy link to clipboard

Copied

P Spier wrote:

Eugene Tyson wrote:

Perhaps they need a new plugin/application just for doing tables, like an excel type program that you link your files from?

Oh please, NO! Let's not go back to Pagemaker's Table Editor. You can link Excel now...

All of that aside, I doubt you'd find anyone who hates tables in ID more than me. I've done the Table styles demos and exercises, and the samples always work flawlessly. As soon as I try to do something in the real world with my own oddly formatted tables, though, everything falls apart, and my last two big projects have been very heavily tabled. Grrrrrr.

Peter S:

How about letting us know what awful, recalcitrant, and mean-spirited InDesign table gremlins have attacked you, so we don't step into the same danger zones?

Regards,

Peter

_______________________

Peter Gold

KnowHow ProServices

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 29, 2009 Sep 29, 2009

Copy link to clipboard

Copied

Where to begin?

The current project is a price book -- essentially nothing but nearly identical tables. I created cell styles, but couldn't seem to make them work consistently (they had both shading and paragraph styles, as well as borders). I built tables with header rows and oddly combined shading patterns, applied the cell styles, made a table style based on the first table, imported the data from Excel, tried to apply the table style, NG. Had to format by hand.

Copying the first table, all formatted with the correct cell styles, and pasting in new data didn't keep the formatting.

Client wanted to swap positioning on a few columns, which messed up the shading pattern. Sometimes applying the cell style for the correct shading would work (on the second click to remove overrides), mostly not.

I'm sure it all can be traced back to user inadequacies, but I'm a fairly proficient user, and I find tables to be a vipers' nest. I can only imagine what it's like for newbies.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Sep 29, 2009 Sep 29, 2009

Copy link to clipboard

Copied

Even for doing accounting books, like annual reports, a simple double underline button, or single underline button or something. It's so petty using tables it takes an age to do a book that contains mainly tables.

For this particular function I use paragraph styles. Create a paragraph style with a single paragraph rule below, another with a double paragraph rule. Add a decimal-tab while you're at it. An advantage with using paragraph rules instead of cell borders is that you naturally get a break between columns, which is usually what you want.
And using quick-apply or paragraph keyboard short cuts makes them almost as easy to apply as dedicated buttons.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 29, 2009 Sep 29, 2009

Copy link to clipboard

Copied

Good to know that (a) I'm not going crazy and there isn't a built-in way to easily do what I originally asked...and (b) that I'm not alone in wanting this kind of capability.

Thanks,

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 29, 2009 Sep 29, 2009

Copy link to clipboard

Copied

It should be pretty easy to script. I personally don't do a lot of

table work, but if you'd like to explain me exactly what you need, I

can see if I can help.

You can send me a PM if you'd like.

Harbs

http://www.in-tools.com

Innovations in Automation

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 29, 2009 Sep 29, 2009

Copy link to clipboard

Copied

--

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 29, 2009 Sep 29, 2009

Copy link to clipboard

Copied

Peter,

I see a link in your email post, but it isn't there on the web page. Did you edit?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 29, 2009 Sep 29, 2009

Copy link to clipboard

Copied

It came through to email. Odd...

Here's the link: Page 62 in http://oreilly.com/catalog/9780596802523/

I just checked in my copy. Yes, a full script is there (as well as some other very useful table scripts). I think Peter's book is worth the price of admission for this script alone! (Not to mention it being an excellent source for anyone who wants to learn about scripting!)

Harbs

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 06, 2016 Jun 06, 2016

Copy link to clipboard

Copied

7 years on....

Has InDesign addressed the issue of "autofit" for table columns?

If not, why?  (I will have to explain this to Managers who are forking out for the dozen Adobe Suite liceneces and can see our PIMs exporting with "autofit" and InDesign not doing it.)

Many Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 07, 2016 Jun 07, 2016

Copy link to clipboard

Copied

Hello Brian,
what would you exactly expect from "autofit" for table columns?

As far as I know, Microsoft never introduced hyphenation for contents in Excel cells and I'd like to know what "fit" should exactly do when "hyphenation" is on or off. If you are searching the web for scripts regarding InDesign tables, there should be something available, that would come close what Excel is doing with "fit" to text width.

Or are you after a function, that would minimize white space in tables and give an optimal table length and is able to balance the width of the columns? There can be found some script snippets in the InDesign Scripting forum that try to accomplish this. Though, they are not "auto" in the sense, that every time you change the contents of a cell somewhere in the table, the column width of all columns will be adjusted…

And to answer your question more directly:

No. Nothing has changed with InDesign the last years when it comes to "autofit" for table columns.

Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 07, 2016 Jun 07, 2016

Copy link to clipboard

Copied

Hi Uwe,

I've attached a screenshot of what we are looking at below. The first column clearly has whitespace.

I should add at this point we are generating this all through the EasyCatalog plugin, which is generating a 1000 pages for our catalogue. So the tables have dynamic content. Empty columns are deleted automatically.

What we would like is that the table column  "autofits" to the width of the text.. Even if that means the table would possibly extend further off the page. At least we would be able to look at the data and how it is formatted and look at solutions. As it stands with InDesign, it offers no way of resizing table columns to content, and we have no real idea what criteria it is using.

I'm a little surprised that autofit has not been implemented yet within the Program itself.

I've created some scripts in the past to automate many parts of InDesign and EasyCatalog. So do you think that is the only option at the moment Uwe?

image.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 07, 2016 Jun 07, 2016

Copy link to clipboard

Copied

Hi Brian,

glad that you are showing an example table with a real-world text.
Your arrow is pointing at a problem you are seeing in column one.


But the solution is maybe lying in column four and two, if the four columns and the four body rows would be the whole table.

I'm talking about white space here not only in one cell, but you have to consider the white space of every cell in the whole table plus the height of the table at the same time.

I once did a script, that tries to consider this and is changing the width of all columns to result in a table that:

1. Has an "optimal" height

2. Is aesthetical pleasing to the eye

( I'm designer and developer in one person )

The script is not perfect, but it does a good job as a starting point.
But here comes the problem: It is also very slow.

I found, that with rather small tables where one person (the layouter) is able to conceive the whole table at one glance, it is faster to do the work not automatically. If the table spans several pages you have to get the whole picture first to make decisions.

Back to your example. A human beeing with experience on table design will know in an instance, that columns two and four should be made wider and column one and maybe column three should be made narrower. But only, if the scope is on the shown cells, that are not the whole table. However, what the exact width of every column will be best would require some steps of iterating and guesswork. Nothing against guesswork, I'd say.

And we have also to consider "contents" and some typographical rules if we aim for good readability. Plus some knowledge about the addressed reader. Your example is showing this clearly. Contents is not only filling space with glyphs, but to present the contents in a readable way. What bit of text belongs to one unit, what bit of text to another unit, that the eye of a reader should be able to destinguish?

So my take on this is:


1. You have to write a damn good script, that incorporates some aesthetic rules to make a good result.

That script will not be fast. It will be slow. And its result could be topped by a good designer who knows very much about typography, white space, plus—and that's most important—the meaning of the contents.

2. To make it faster you have to write the logics into a C++ plug-in.

Best,
Uwe

PS: Did I say "Artifical Intelligence" or "Self Learning Algorithms?" Um… perhaps no.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 08, 2016 Jun 08, 2016

Copy link to clipboard

Copied

Uwe,

Marc Autret has written an unfoundable script some years ago to do that! 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 08, 2016 Jun 08, 2016

Copy link to clipboard

Copied

And you misplaced the link, didn't you? 😉

Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 08, 2016 Jun 08, 2016

Copy link to clipboard

Copied

No link!

My personal version, updated by Kasyan Servetsky!

This version works perfectly with ID CC!

Dropbox - AjustementMagique_MarcAutret_UpdatedbyKasyanServetsky_17082014.jsx.zip

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 30, 2017 May 30, 2017

Copy link to clipboard

Copied

That link is no longer active. No results searching for it. Is there an active location for this script?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 30, 2017 May 30, 2017

Copy link to clipboard

Copied

That link is active. I just clicked on it and it worked for me.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 30, 2017 May 30, 2017

Copy link to clipboard

Copied

Sorry Steve, my reply was in response to Obi-wan's link for the cell width autofit script, Dropbox - AjustementMagique_MarcAutret_UpdatedbyKasyanServetsky_17082014.jsx.zip Your link definitely does work, just not what I was referring to. Thanks for the quick response in any event.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines