Hi all,
Is there a trick to swap the columns of an table? What I want to do: I've got a table with 2 columns, A (left side) and B (right side). Now I want column A to become column B (i.e. to move to the right side) and vice versa. Is there a way to do that without copying and pasting the whole text of the column?
ninjagame
Swap Columns of A Table
Re: Swap Columns of A Table
hey, I've got 2 macros, aptly named ←move column left and →move column right… and I didn't write them: aren't they part of the standard package?
- martin
- Official Nisus Person
- Posts: 5227
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
Re: Swap Columns of A Table
Those macros actually come from Kino and his always incredibly useful macros:feat wrote:hey, I've got 2 macros, aptly named ←move column left and →move column right… and I didn't write them: aren't they part of the standard package?
http://www2.odn.ne.jp/alt-quinon/files/NWPro/table/
The column moving macros are in the "MoveRowColMacros.zip" archive.
You could select the whole column and cut/paste it at once.ninjagame wrote:Is there a trick to swap the columns of an table? What I want to do: I've got a table with 2 columns, A (left side) and B (right side). Now I want column A to become column B (i.e. to move to the right side) and vice versa. Is there a way to do that without copying and pasting the whole text of the column?
Probably it would be best if we had built-in menu commands for this.
Re: Swap Columns of A Table
the problem is pasting behaves inconsistently:martin wrote:select the whole column and cut/paste it at once
- if we are dealing with a two-column table, the pasted data will either
- generate new extra rows (if only cell 0.0 is currently selected)
- or, if the whole column is already selected, replace the current data
- yet if there are more than 2 columns, paste will behave differently…
- martin
- Official Nisus Person
- Posts: 5227
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
Re: Swap Columns of A Table
Ah, I see what you mean. NWP tries to guess what paste operation would be most helpful, based on the number of rows/columns in both the selection and content being pasted, and none of those operations are what you need exactly. Sorry about the frustration; I've made sure that we have an enhancement filed for adding built-in column/row swapping commands.feat wrote:the problem is pasting behaves inconsistently: