I love table and cell styles, but I’ve run into some strange issues with them over the years. After encountering it again today I decided to figure out exactly what is going on, because I couldn’t find any other write-ups on the issue on the net. Hopefully others find it helpful.
Problem: You have a table style that applies alternating row fills. You have a table that has some cells that have manually-applied cell fills. When you apply the table style, any cells with unique styling retain their overrides or cell styles. While you can apply different cell styles or different color fills, there is no obvious way to simply remove the local color attributes of the cells, so you’re stuck with having to manually color the problem cells to match what should happen automatically.
Applying a table style with alternating fills won’t work very well on a table that already has cells with color fills, because it doesn’t remove them. There has to be some way to remove those color fills.
Recreating the Problem:
- Make a table with 10-or-so rows.
- Select a block of cells several rows high and fill them with a swatch of your choice.
- Make a table style and set up an alternating fill pattern of your choice.
- Apply the the table style to your table. You’ll see your alternating rows, but your block of custom-filled cells will remain unchanged. This is not the problem; The problem is that now…
- Try to remove the local color from those custom-filled cells. As far as I know, you can’t. Not without using the workaround stated below.
Relevant Versions: Tested in CS6. I’ve seen similar issues for as long as Cell and Table Styles have been available.
Workaround: The only way that I’ve found to remove local color fill from table cells is to apply alternating fills via the Table Panel (NOT the Table Styles panel). When you apply a Table Style, all local cell fills are preserved—even when you remove overrides. However, When you use the Table Panel to apply alternating fills it strips out all other table fills. In fact, this is the ONLY way I’ve found in InDesign to clear local fills from a table (readers, please fill me in if I’m missing something!)
- Select the table in question.
- Go to the Table panel menu (NOT the Table Styles panel).
- choose Table Options: Alternating Fills
- choose the pattern you want; turn on preview so you can see what it will look like. Click ok.
- This will remove all local formatting from the table, so that you can properly apply formatting using your table style, even if you got your colors wrong in the previous step.
- If local fills are needed on some cells, apply them (preferably with cell styles).
This is not a true solution; it’s a rather cumbersome workaround. It removes ALL local fills from the table. It will get your table styles and alternating fills working, but then if there were some custom fills you wanted to keep, they’ll be lost; you’ll have to go fix them.
Feature Request: It would be nice if Cell Styles had a fill option to force a cell to remove any color that is applied to the cell. This is not currently an option. There is an option to use the “None” swatch, but then this forces the cell to actually apply “None”–it goes invisible. What we need is an option to remove all local color so that the color specified at the table level can show through. This could be stated as “Use Table Default” or something similar.
It would also be nice to have this option in the table panel; to be able to select some cells and then remove their color so that they revert to the table color, rather than using a local color.
Consider the case of a large, complex table with hundreds or even thousands of cells, using a combination of alternating row fills as well as cell styles to fill in some cells. I fill in some cells, then later I need to turn those fills “off” but I can’t. I insert a new row in the table, and all of a sudden all my fill boxes that I’ve tried to turn off by making the same color as the background fill are out of synch with their background and I have a mess on my hands, and it gets worse and worse the longer I work on the file. I could reset it all by Forcing an alternating fill application on the whole table, but then I’d lose all my other custom fills that are scattered about. There really is no good solution available in this case.
Note: although I have not tested this with cell strokes, I believe a similar situation would exist for InDesign’s alternating strokes feature as well.