Page 1 of 1
Swap Columns of A Table
Posted: 2012-01-27 03:55:06
by ninjagame
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
Re: Swap Columns of A Table
Posted: 2012-01-27 11:28:50
by feat
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?
Re: Swap Columns of A Table
Posted: 2012-01-27 17:06:56
by martin
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?
Those macros actually come from Kino and his always incredibly useful macros:
http://www2.odn.ne.jp/alt-quinon/files/NWPro/table/
The column moving macros are in the "MoveRowColMacros.zip" archive.
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?
You could select the whole column and cut/paste it at once.
Probably it would be best if we had built-in menu commands for this.
Re: Swap Columns of A Table
Posted: 2012-01-28 00:39:10
by feat
martin wrote:select the whole column and cut/paste it at once
the problem is pasting behaves inconsistently:
- 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…
so, yes: consistent no-brainer built-in commands would be welcome!
Re: Swap Columns of A Table
Posted: 2012-01-30 16:44:17
by martin
feat wrote:the problem is pasting behaves inconsistently:
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.