6 Replies Latest reply on Jun 29, 2017 6:00 AM by Laubender

    column width in cell specs


      My company is specialised in making annual reports, so tables are a big part of my work. For design those tables I'm using cell and table specs, but I can't see is a way to format the size of cells. I have to do that maually, for every table again.

      It would save me a lot of time if it would be possible to define column widths and row heights in cell specs. Does someone know how this would be possible? Is there a script that resolves this problem? I'm using InDesign CS5.5.

      I would be very grateful indeed.

        • 1. Re: column width in cell specs
          Laubender Adobe Community Professional & MVP

          @robin – you could try the following script by Gerald Singelmann; it's in German, but maybe you can utilize it. You can redefine the width of all columns of your table and save the settings as part of a table style.


          "Autospalte2" (Autocolumn2)



          The zip file you can download there contains a folder with two files:





          The jsx file should go into the "Applications/Adobe InDesign CS5.5/Scripts/startup scripts" folder.
          But with InDesign CS5.5 it might not work and would not install a new menu item.

          If this is the case, you do need it at all.

          Just put the jsxbin file  in the "Applications/Adobe InDesign CS5.5/Scripts/Scripts Panel" folder.


          To use the script with jsx you have to restart InDesign.
          Set your curser inside a table cell, doubleclick the jsxbin file and you are ready to go:


          1. Text curser is set inside a table cell, jsxbin in the InDesign Scripts Panel is doubleclicked and is showing the controls with default values for the width of all columns:



          2. Set new values:



          "Alle "Auto" an" => set all to "auto"

          "Alle "Auto" aus" => set nothing to "auto"
          "Aus Format laden" => load settings from table style
          "Speichern in Format" => save to table style
          "Abbrechen" => cancel



          3. Table after hitting OK.
          Width of the columns from left to right: 30, 30, 50, 15.75, 15.75





          if you use table styles, you could add the width values for the columns to that style, be it a precise number or "auto".



          • 2. Re: column width in cell specs
            robin1969nl Level 1


            Just what I needed! This wil save me soooooo much time and trouble...

            I don't know how to thank you; I will name my fist borne after you ;-p


            but seriously: thanks!

            • 3. Re: column width in cell specs
              Laubender Adobe Community Professional & MVP

              @robin – that will better go to Gerald Singelmann ;-)


              It's not *exactly* what you need, since you mentioned row heights values. But you can pre-define thiese values with cell styles…


              Hope, the script is working as expected…
              I tested on my German InDesign CS5.5 v7.5.3 with Mac OSX 10.6.8.
              But it should work on Windows as well.



              • 4. Re: column width in cell specs
                robin1969nl Level 1

                Well, you're right about the row heights. I wanted to use that option for placing cell strokes below text in cells, and it would be easier to use a script . But I can work around that by adding a value in the cell inset, as you said. Column widths, however, can't be predefined, but thanks to this script it is now possible.


                So Im really grateful. I've been looking for a script like this for ages.


                • 5. Re: column width in cell specs
                  cathg74 Level 1

                  This looks great, but I'm wondering how you would add the width values to a table style so that all tables with that style will then update to reflect the new widths?

                  • 6. Re: column width in cell specs
                    Laubender Adobe Community Professional & MVP

                    Hi c.g.d,


                    the script has to check if new values are applied to any table style, then goes through all the tables in the document and applies the new values. Under the hood Gerald's script is storing the values in labels that are attached to a table style. A similar thing can be done by giving values in String form to selected objects on the page, selected tables or selected cells by using InDesign's Script Label function that is available in the UI.


                    I cannot look into Gerald's script because it's in jsxbin format, but one could do a script with an event listener that would check every time InDesign is idle, if some of the values were changed last time an idle event was fired to correct the width of all tables in a document.


                    That would perhaps a script that is based on Gerald's script and using Gerald's notation system for column width.