Skip navigation
Aaron Johns
Currently Being Moderated

Can this be done with table styles?

Nov 26, 2012 10:04 PM

Hello,

 

Can someone tell me if this table layout is possible to achieve with table styles? Specifically the first column being slightly darker is proving a problem with the alternating rows, I feel like I need a 'column style' option but there isn't one (in CS5) that I can see. Thanks very much.

 

Screen shot 2012-11-27 at 4.53.11 PM.png

 
Replies
  • Currently Being Moderated
    Nov 27, 2012 4:36 AM   in reply to Aaron Johns

    Not that I can figure out...

     

    There might be a plugin or script for this but I've not come across any.

     

    Perhaps you should ask on the scripting forum?

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 27, 2012 6:44 AM   in reply to Aaron Johns

    Not as a table style--would be nice, though. You probably know you can use cell styles to override the color. Kind of tedious if you have a ton of tables, though.

     

    Take care, Mike

     

    table_styles2.jpg

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 27, 2012 6:55 AM   in reply to Aaron Johns

    In thinking about a scripting solution, one might be able to write the script where one highlights the left column and the script applies appropriate cell styles to every other row. Or, the entire left column is hit but the header row skipped.

     

    Take care, Mike

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 27, 2012 7:54 AM   in reply to MW Design

    @Mike – if you think in scripting this, I would totally avoid  using Table Styles.

    Instead *only* using Cell Styles. If the logic of applying Cell Styles is clear – and I think in this case it is – one can write a script that can do that, independent how many rows or columns are present.

     

    On the other hand, you could use a PlugIn e.g. from Woodwing, SmartStyles, that could save the table logic as a Library element, that  could be applied to a table.

     

    What is also possible (without scripting or buying a plug-in):
    Format a table in advance. This is done in a few minutes. You do not need cell styles for that.
    Then copy/paste the contents over the clipboard from Excel to InDesign when  the table is selected.

     

    Uwe

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 27, 2012 8:05 AM   in reply to Laubender

    To elaborate on my last statement:

    If you do not have the contents of the table available in Excel, just select the table in InDesign, copy/paste to your text editor (it is alright to use TextEdit on a Mac), and then copy/paste the text from TextEdit on to *one* cell in Excel. Excel is smart enough to built a table with the right contents in the right order.

     

    Then do your formatting of the table in InDesign:
    copy/paste rows as much you like, so that you have a really large table (in the moment with the wrong contents).

     

    After that select the Excel table and copy/paste the contents to your selected InDesign table.
    The formatting of the text will be that of your pre-defined InDesign table cells.

     

    Uwe

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 27, 2012 8:10 AM   in reply to MW Design

    Sans cell styles, this Javascript adds 20% to the tint of cells in the very first column for each table. It does not change header rows (and on 2nd thought, maybe it shouldn't do footer rows either).

     

    .. Without trying, I couldn't tell what happens with complickated merged cells. The document I'm working on contains 8 tables, but the idiotic author pasted them as figures into Word. All of my scripting prowess can't work around that ...

     

    tables = app.activeDocument.stories.everyItem().tables.everyItem().getElements();
    for (t=0; t<tables.length; t++)
    processTable (tables[t]);
    function processTable (table)
    {
    var i, cells = table.columns[0].cells;
    for (i=table.headerRowCount; i<cells.length; i++)
    {
      cells[i].fillTint += 20; // percentage to add
    }
    }
    
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 27, 2012 8:58 AM   in reply to [Jongware]

    Awesome. I'll have a play with the script later when I come up for air.

     

    Thank you--Mike

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points