Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm looking for a program that can view and edit text files that contain data in a fixed width format.

The files contain no carriage returns.

I've tried viewing them in excel but the import process makes me insert a break line at every column. The text has 3 columns total, with 15, 12, and then 30 characters in each.

Does anyone know how I can view these files without opening them in notepad where they look like just a jumble of text?

Thanks

share|improve this question
    
What exactly did you use to create the file to begin with? –  Kez Mar 4 '10 at 8:31
    
No idea sorry. It's created by a third party. –  JimDel Mar 4 '10 at 21:24

4 Answers 4

up vote 2 down vote accepted

The key point everyone is overlooking is the files contain no carriage returns. That is, it sounds like the text files are just one long line that cycles through three fields of length 15, 12, and 30.

You can probably use any text editor with a fixed width font, if you turn on word wrap and resize the window to be exactly 57 characters wide. You probably also want a text editor with overtype mode, so the fields will stay lined up as you edit.

(Edit: As I commented on Mush's answer, WordPad might work with the following setup. Go to View, Options, Text. Select "Wrap to ruler" and check Ruler so the ruler is visible. Then drag the right margin triangle in the ruler until you get the text to wrap at exactly the 57 characters you need. Also, press the Insert key on the keyboard to turn on overtype mode.)

A hex editor might work, if you can set it to exactly 57 characters per line. I have XVI32 on my computer, but even at the smallest font size and with the address column turned off, I could only fit about 45 characters per line on my 1024 × 768 screen. If your screen resolution is larger you may be able to squeeze in the 57 characters you need. The problem is XVI32 always shows both the hex data and text data, but it sounds like you're looking for a similar editor, but just need the text view.

share|improve this answer
    
+1 edited question to emphasize this point. –  Kez Mar 4 '10 at 8:33
    
Your right Bavi_H. It's just one long string. That XVI32 is the closest thing I've found to what I'm looking for. But like yours, my screen isn't wide enough. –  JimDel Mar 4 '10 at 19:58

You could look at:

share|improve this answer

If it is a fixed width, notepad should be able to do it fine and I use it for something similar - I am unsure why you are having these problems but I can take a guess.

You are probably using a fancy font of some sort. Go in to Format > Font and choose Lucida Console as the font, or System\any other fixed width font and you should not have any problems.

You may also want to look at other tools such as Notepad++ (available on Ninite for easy installation) or Notepad2

share|improve this answer
1  
I would second the Notepad++ recommendation. –  mindless.panda Mar 4 '10 at 3:34
    
of course, +1 for Notepad++ too :) –  Ye Lin Aung Mar 4 '10 at 3:55
    
real man use vim :) –  akira Mar 4 '10 at 4:02
1  
@Akira :P .... real men just use a magnetised pin and manually change bits on a hard drive!.... Seriously, I don't mind VIM, but I say, if there is a tool that lets you do something easier and quicker - use it! –  William Hilsum Mar 4 '10 at 4:22
    
hehe, i was just ... tickling the notepad*-fanboys, i actually do not really care about what others use to get their stuff done. –  akira Mar 4 '10 at 4:47

Hopefully this isn't a stupid question, but did you try Wordpad?

share|improve this answer
    
WordPad might work with the following setup. Go to View, Options, Text. Select "Wrap to ruler" and check Ruler so the ruler is visible. Then drag the right margin triangle in the ruler until you get the text to wrap at exactly the 57 characters you need. Also, press the Insert key on the keyboard to turn on overtype mode. –  Bavi_H Mar 4 '10 at 6:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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