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

Overwriting the Header Style with Left Column Style in Table Styles

Explorer ,
Mar 04, 2025 Mar 04, 2025

Copy link to clipboard

Copied

Hello! I'm trying to make a table style that makes my table look like the 2nd table in the image, but everything I've tried so far in table styles looks like the 1st table. Specifically, the issue I'm having is that the Top Left Cell of the table defined in the style uses the header style with the gray fill, but I want it to have no fill to match the rest of the left column, as well as no stroke on the left side of the cell. 

 

I've tried defining a cell style for the Header row and a separate cell style for the Left Column, but it seems the header cell style always overwrites the left column style. Even more bizzarre, one of my coworkers was able to create a table style that works like the 2nd table, but when we repeated the steps on my Mac they didn't work and gave me the 1st table. I'm just utterly confused on why this is happening. Does anyone know how I can define a table style to make the tables look like the 2nd table instead of the 1st?

TOPICS
How to , Type

Views

82
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 ,
Mar 04, 2025 Mar 04, 2025

Copy link to clipboard

Copied

I don't think you can.

 

When you select Cell Style to be applied to the Header, Footer, Body, First, Last - it will be applied to all columns / rows meeting the criteria - you can't target just the first Cell in the Table - because it will belong to the Header (if set in table's preferences) AND First column - not one or the other.

 

Each part of the Table has its own CellStyle applied:

RobertatIDTasker_1-1741104027854.png

 

Votes

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 ,
Mar 04, 2025 Mar 04, 2025

Copy link to clipboard

Copied

Thanks for the response. Is there any way to have the left columns style override the header row's style? In your example, it would be making the yellow span all the way from the top to bottom, overiding the blue in the top left cell.

Votes

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 ,
Mar 04, 2025 Mar 04, 2025

Copy link to clipboard

Copied

Unfortunately not.

 

As per screenshot - this is how Cell Styles are applied to parts of the table.

 

If you have a lot of Tables to process - there are free, simple script solutions - or paid, more advanced.

 

 

An example of a free, simple script solution - will apply selected CellStyle - in this case "footer" - to the FIRST Cell in ALL Tables in ALL Stories: 

 

app.activeDocument.stories.everyItem().tables.everyItem().cells[0].appliedCellStyle ="footer";

 

 

RobertatIDTasker_0-1741108274335.png

https://creativepro.com/how-to-install-scripts-in-indesign/

Votes

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 ,
Mar 04, 2025 Mar 04, 2025

Copy link to clipboard

Copied

LATEST

If you change it to:

 

app.activeDocument.stories.everyItem().tables.everyItem().cells[-1].appliedCellStyle ="footer";

 

"[-1]" - which means LAST cell in the Table:

 

RobertatIDTasker_0-1741108527584.png

 

In a similar way you can address rows / columns - or even specific cells in those rows - FIRST Cell - cells[0] - in the LAST Row - rows[-1]: 

 

app.activeDocument.stories.everyItem().tables.everyItem().rows[-1].cells[0].appliedCellStyle ="header";

 

RobertatIDTasker_0-1741108651111.png

But that's a very simple stuff.

 

Votes

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