What I need to do is move a column of text over to another part of the file, however each line needs to be a specific amount of spaces at the end and I cannot copy the lone column over because it wraps to the next line.

Is there anyway to do this? A very primal way to put it would be this:

A     B     C      D     E
1     2     3      4     
1     2            4     5
1     2            4     5
1     2            4     5
1     2            4     5

So I have to move the "5"'s over under the C. Each line had to be 150 characters each for it to work properly. I've tried moving it to excel to move the column over however once we export it to a text file all of the configurations get messed up and we can not use it.

link|improve this question

80% accept rate
Why, what doesn't work with the Excel way? You most certainly can import the data and then export it and for example replace the tab stops with spaces. The missing spaces to reach 150 characters can be appended with some small scripts (Perl, Ruby, somebody will cook that up on Stackoverflow, I'm sure) – slhck Feb 28 '11 at 21:00
feedback

3 Answers

If i remember correct you could simply press the ALT key and then select text in a "box" with the mouse, or with the arrow keys (as you like). Afterwards you could copy and paste it...

link|improve this answer
Well, through some work I got the information I need alone in a seperate file. However, when I go to past them into the column I need them to be in, it creates a whole new line and puts them all in the new lines instead of in the column I need them to be in. It's not a Word file, by the way. It has to be opened in Note Pad for formatting reasons. – AgainstClint Feb 28 '11 at 21:13
If the line brakes make problems, just show them in word so you could mark the numbers, or cut and paste the spaces first. You will need to cut some spaces, to keep the order in your file anyway. If you put them at the end of the lines you can easily mark the numbers. – Darokthar Feb 28 '11 at 21:28
I don't think I may have made myself clear on what this is. They aren't actually in formatted columns, they are in "columns" separated by spaces, so to find one column and move it is impossible. It's also not numbers, I just put those there as a mock up of the format. It's actually addresses that I need to move over. But since it's one large block of text thats spaced out to look like columns, this process is very difficult. – AgainstClint Feb 28 '11 at 21:44
I also cannot put it into word because the format of text is completely off, so when I do put it into Word it makes a mass bock of 0's and other characters that cannot be formatted to anything usable. – AgainstClint Feb 28 '11 at 21:45
Your problem sounds weird. If you can edit in notepad without problems word should be able to do it. For me it sounds like some kind of .csv file, which is using spaces instead of semicolons. Try to follow slhck comment and import your file to excel by using using Data -> Import external Data -> Import Data -> Text files. A Dialog will pop up with questions. Set the separating character to spaces. I hope this will work. – Darokthar Feb 28 '11 at 21:58
feedback

I'm pretty sure this is a fixed width CSV file. i.e. the padding of each column is critical to the layout for importing and exporting. Although Excel can load this type of file in it cannot export it back out in the same format.

I have a tool called CSV Easy that might help. So load it into Excel, sort it out, export it as a csv, load into CSV Easy and save as fixed width.

A trial version is available at csveasy.com

Hope that helps.

link|improve this answer
feedback

If this is a plain text file (I'm confused by the Excel and Word tags), you could just use EditPlus, alt-C allows column selection.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.