text editor--how to cut/paste columns, not rows?

I think there’s a general feeling of: it’s a text file, you want to edit it, so use a text editor. Along with nostalgia for doing things “simply”.

But in this case with thousands of rows of data, I think it’s likely the columns wouldn’t line up as perfectly as the example. If not, vertically selecting is going to give messy results. So the simple solution (text editor) is much more complex than just importing OPdata.txt into evil Excel. Which the OP is using later anyway.

The OP does not appear to have Excel and does not say that he or she will use it later. The OP also says that he or she needs to produce a text file in the desired layout. Excel is not actually that good for reordering columns, nor for producing neatly formatted text files.

If one has access to any form of Unix or Linux, then it might even be possible to write a simple little shell script (perhaps with the help of sed and awk) to reformat, rearrange, or extract data from a text file. In the last year or so, we’ve had several requests from one Doper (drewtwo99) for help with little scripts for tasks like this, which were always successfully provided very quickly.

See:

Those are literally the exact things Excel excels at.

I find swapping selected areas fiddly in Excel. Most people do it via a relatively tedious “copy somewhere else, move the other column, copy the first column back” procedure. In the text editors mentioned above it’s a straightforward drag and drop.

yep–that’s me! I’m a total newbie to Excel, and it still feels very tedious and awkward to me.

Thanks for all the suggestions! Especially the link to Notepad ++ .

And, like the people who mentioned Qedit, etc–I’ve been using a Dos editor called PE2 ever since 1989 or so.I still use Dos commands for other things, too.Sometimes it’s a lot easier.
For example-manipulating 20 files with similiar names: ( “Pipeline” “pipeline1” “2ndpipeline” “Sewerpipes” “pipes-sewer” Waterpipe2" and “Newpipes” “Oldpipes”)
I can delete them all with one command in Dos --only two words to type.( del pipe).
Or copy them all to a new directory* with one command ( Copy pipe newdirectory )
In Windows, you have to scroll up and down and hunt each file name alphabetically and then hit shift click each time.

*(heh,heh–I said directory, not folder :slight_smile: )

Editing text within a file and manipulating multiple files are totally different things.

In any case, in Win XP you can just search for files which contain “pipe” and then select them all and copy or delete or whatever.

on a mac, you hold down the option key and it will select a rectangle of text.

Bravo! I still use a plain old DOS command prompt much of the time, not to mention plain old shell when I use Linux. There really is a lot of flexibility with the CLI paradigm (more so with Unix-style shell than with DOS though).

The problem with GUI interfaces is that the designer of the operating system or GUI sat down and envisioned a collection of actions he thought would be commonly useful, and implemented those. Every neato-keeno trick you can do with a GUI works because the programmer thought about it and chose to implement it. And GUI design does seem to entail programmers spending a lot of effort thinking up and implementing as many tricks as they can think of. (For example, if you have one Firefox window with lots of tabs open, you can re-arrange the tabs by dragging a tab to the left or right. That can only happen because the Firefox programmers thought of it and implemented it.)

The command line interface seems to offer a lot more flexibility, commonly with lots of command line parameters (if you can remember them all) to do lots of things that you can’t do, or can’t do easily with a GUI interface. For an extreme example of this, consider the Unix find(1) command.

And. . . (heh, heh) Yeah, he said “directory”, just like God intended! :stuck_out_tongue:

Hello,

I am not sure if this question is still an issue for you, but you can use the editor SPFLite to easily do what you describe. See www.SPFLite.com for complete information about the editor.

Briefly, if you want to “cut” columns of data, in the sense of copying the data to the clipboard, then removing the column from your edit file, you would use the SPFLite feature called Power Typing. You would select the entire file as the ‘range’ of the PTYPE command. At this point, you would highlight your column of data, and issue a (PowerCut) keyboard function. (You would have had to previously mapped this function to some key combination first. I happen to use Ctrl-Shift-X for (powerCut))).

Then, press Enter when your Power Typing session is done. At this point, your column of data is in the clipboard, where you can use it inside or outside of SPFLite.

You would have to read the manual to understand all the technicalities to make this editing action possible. On the web site, the complete manual is available online, so you can evaluate it prior to downloading.

Hope this was helpful.