Hide table rows and columns
I would like the ability to hide table rows and columns, like can be done in Excel.
Even better than hiding them would be the ability to apply conditional text to specific rows or columns. Right now, if I need to hide a row, I have to cut it and paste it onto the pasteboard, then when I need it, I have to go back into the table and try to reinsert it.
-
Anonymous commented
I have a script that sets a row height to 0 but cannot do the same with a column.
Uwe, how is that accomplished with a script.Row height 0 script attached
main();
function main() {
// Main function goes here
var myRow = getRow();
myRow.autoGrow = false;
myRow.height = 0;
return (0);
}function getRow() {
if (app.selection.length > 0) {
var mySelection = app.selection[0];
if (mySelection.parent.constructor.name == 'Cell') {
return mySelection.parent.parentRow;
} else if (mySelection.constructor.name == 'Cell') {
return mySelection.parentRow;
}
}
alert ('Cursor not in a table\ror illegal selection.');
exit();
} -
Arthur commented
Hi Uwe Laubender,
I can't set the column width to 0. The program tells me that it has to be at least 1,058 mm. I have loaded your example and I have seen that you have the columns with width to 0. How have you done it?
-
Uwe Laubender commented
Hi Kelly,
"hiding" a table column is possible by scripting if the column contains text only. To avoid overset text all the text in that row can be done with conditional text where the condition is set to invisible.Entirely "hiding" a row is not possible. Even by scripting.
It once was with older InDesign versions like CS4 or CS5.See some samples tables in that document:
https://www.dropbox.com/s/sfullcko0ff6f6r/200725-1-Tables-HiddenColumns-vs-HiddenRows-15.1.1.103.indd?dl=1Other constraints: If you have a numbered list you cannot set the auto numbers to conditional text, I think.
Regards,
Uwe Laubender
( ACP )