Topic: Transposing a csv table (columns to lines) (1 of 3), Read 15 times, 1 File Attachment
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Friday, May 13, 2011 03:56 AM

On 5/4/2011 10:54:09 PM, somwhere else Peter Rejto wrote:
>
>I also would like to perform the magic
>of converting rows into columns. Could
>you please give me a more detailed set
>of instructions ?

Peter:

Just for fun I wrote a macro "transpose.vdm" (attached).

Please note: It is a demo/study only!

In theory it can handle CSV tables up to 80 columns,
but then there need to be added some code to save buffer 2 (used to build the resulting table) to a file.


Christian

 
TRANSPOSE.VDM (2KB)

 


Topic: Transposing a csv table (columns to lines) (2 of 3), Read 18 times
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Thursday, May 26, 2011 01:00 AM

On 5/13/2011 3:56:01 AM, Christian Ziemski wrote:
>On 5/4/2011 10:54:09 PM, somwhere else
>Peter Rejto wrote:
>>
>>I also would like to perform the magic
>>of converting rows into columns. Could
>>you please give me a more detailed set
>>of instructions ?
>
>Peter:
>
>Just for fun I wrote a macro
>"transpose.vdm" (attached).
>
>Please note: It is a demo/study only!
>
>In theory it can handle CSV tables up to
>80 columns,
>but then there need to be added some
>code to save buffer 2 (used to build the
>resulting table) to a file.


Thanks Christian,

After downloading your "transpose.vdm", I was surprised to find my own experimental macro. Here it is :

// TRANSPOSE.VDM
// Experimental Macro; Correctly gives the transpose of a comma delimited block which is on a single line/raw.
// Based on a suggestion of Pauli Lindgren.
Replace_Block("|H2C","|N", BB, BE, ALL)
Return()



Note that it is a special case only !

I have just searched this webboard for "transpose" and learned that the Pauli reference is to his Sort_Merge()-algorithm thread, in the Other General, etc conference. Specifically to webboard.vedit.com/read?63074,42.

Essentially, there he replaces the comma delimiter with |N, the newline character.

So, I tried to restrict your macro to the case of block consisting of a single raw. I take it should give something simple. But, I could not figure out what it is. Could you help me ?


Now I have another, open ended, question:

Since I have forgotten about my experimental macro, I did put my cursor on the Replace_Block command. Then I invoked the "Command at Cursor" menu command. First I did this in my
my (almost) recent Vedit 6.20.0 version. Here I only got some very very general information. Second I did this experiment in Vedit 6.15.4. Bingo, here I got something really specific.

In short, so far as the "Command at Cursor" menu command is concerned, I do prefer the 6.15.4 help system to the new 6.20.0 help system. Possibly this is due to the fact that I have not gotten used to the new help system ?

I am looking forward to learning the reaction of other Vedit users.


-peter

 


Topic: Re: Transposing a csv table (columns to lines) (3 of 3), Read 16 times
Conf: VEDIT Macro Library
From: Ted Green
Date: Thursday, May 26, 2011 09:41 AM

----- Original Message -----
> From: "peter rejto" ( rejto@... ) On 5/13/2011 3:56:01 AM,
>
> In short, so far as the "Command at Cursor" menu command is concerned,
> I do prefer the 6.15.4 help system to the new 6.20.0 help system.
> Possibly this is due to the fact that I have not gotten used to the
> new help system ?

Please note that I added "Command at cursor" to the right-click (context) menu. I have personally found this very useful.

The old .hlp system does not work under Vista/Win7. I suspect it might if you copy the winhelp.exe file from an XP machine to the Win7 c:\windows\system32 directory, but I haven't tested that. Even if you do that, the old vphelp.hlp files will be increasingly obsolete.

I hope to continue improving the new help system. For one thing I am regularly making changes so that the "Command at cursor" goes directly to the command instead of the beginning of the topic that includes the command. I only recently started learning how to create these .chm help files, as most of the work was done by one of my programmers (Gabe Lein) several years ago, and he left when he moved out of state.

Ted.