Swap Columns of A Table

Everything related to our flagship word processor.
Post Reply
ninjagame
Posts: 152
Joined: 2004-11-27 09:38:42
Location: Hamburg, Germany

Swap Columns of A Table

Post 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
feat
Posts: 105
Joined: 2004-01-29 04:17:10
Location: Paris, FR

Re: Swap Columns of A Table

Post 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?
User avatar
martin
Official Nisus Person
Posts: 5227
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Swap Columns of A Table

Post 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.
feat
Posts: 105
Joined: 2004-01-29 04:17:10
Location: Paris, FR

Re: Swap Columns of A Table

Post 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!
User avatar
martin
Official Nisus Person
Posts: 5227
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Swap Columns of A Table

Post 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.
Post Reply