Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works

Excel to text file with record length > 255

  • Please log in to reply



    New Member

  • Member
  • Pip
  • 1 posts
I need to create a fixed column width text file from an excel spreadsheet. I have 10 columns in excel with a width of 40 characters each. I need to maintain the integrity of the fixed column width and send it to a text file. Therefore, i need the text file records to be 400 characters in length.

I tried to do a File/Save As and select the (space delimited) .prn file in excel. This works great with a spreadsheet with fewer columns so it does not exceed the 255 limit but does word wrap on my 400 character spreadsheet.

I am looking for viable options and would welcome any input.
  • 0


DragonMaster Jay

DragonMaster Jay


  • Banned
  • PipPipPip
  • 826 posts
Hello, valentino1968, and welcome :) to Geeks to Go!

I know the command that you need. Do you know how to use commands?


Columns("B:B").ColumnWidth = 40 << This number is the amount of characters

Or you can try this method:

Posted Image
Click on image to view larger.

Edited by DragonMaster Jay, 16 April 2009 - 11:30 PM.

  • 0




  • Member
  • PipPipPip
  • 335 posts
Maybe I'm missing the point here, but column width in Excel has absolutely nothing to to with the number of characters that can "fit" into a cell.

I agree about there being a maximum of 255 per cell but I'm struggling to see what your problem is..........

Any chance you could explain it a bit better please?
  • 0

Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP