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.
-
Sara Bequette commented
Yes to this suggestion! Here's why:
We have an internal document; let's call it Doc-A. I have a linked copy of this document that I'll call Doc-B. Doc-A contains a complex table that we use internally throughout our company. Doc-B is a linked copy. However, Doc-B is shared with customers so we need to hide some of the columns they don’t care about or need to know. Currently, I have to delete the unwanted columns manually. This is fine if you're doing this once, but we edit Doc-A regularly, so I must repeat the steps each time Doc-B is updated. So, hiding columns and having the ability to keep them hidden—even after updating links—would be extremely helpful!
If anyone has an alternate suggestion, I'd be very welcome to hear it!
-
Tim Sheasby 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 )