Table: Rotate Column Headers
Rotate the cell content of the selected row 90 degrees clockwise.
This script is part of the Tables collection. See the full collection here.ย
This script is part of the Type and Text collection. See the full collection here.ย
To rotate a cell’s contents, place the text cursor in the cell and select one of the rotation icons in the Table panel. Here, the content was rotated 90 degrees counter-clockwise:

But as you can see, the cell’s height isn’t adjusted automatically, you’ll have to do that manually. It’s not difficult or a lot of work, but if you have a lot of tables it gets tedious. The script decribed here makes light work of it.
Use
To use the script, place the text cursor in any column heading and run the script. It has no interface. All the cells in the selected row are rotated and the row’s height is adjusted to the longest cell content:

(The script does not snap the columns to their widths. You can use the Table: Column Snap scriptย for that.)
Note
The script defaults to 90 degrees counter-clockwise. You can change that in the script to 90 degrees clockwise by changing the number 270 to 90, other angles aren’t possible with this script.
If you do want other angles (30, 45, or 60 degrees) you can use a method and script created by Keith Gilbert.
Version history
Last updated 25 Jan. 2026
Peter Kahrel Script Repository
Hosted as a community service, and with deep appreciation, by CreativePro.com
Scripts by Topic | Script Index
Basic Script Installation and Use
How to Modify or Configure These Scripts
Resources for Scripting and Publishing Automation
About This Repository
Contact Peter Kahrel
Note to users: You run scripts at your own risk: CreativePro and the author accept no liability for anything that may be caused by any of these scripts. Always take the necessary precautions. We encourage you to save backups and test scripts on copies of your documents.
This article was last modified on August 22, 2026
This article was first published on January 25, 2026
Commenting is easier and faster when you're logged in!
Recommended for you
Using Presentation Mode in InDesign
Presentation mode is a terrific way to show a document to a boss or client. Lear...
How to Set Column and Row Strokes in Table Styles
This is a super simple tip that every InDesign user who creates tables needs to...
Update Index
When you edit an index, for example to combine entries, you can end up with un-w...
