Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Excel to text file with record length > 255


  • Please log in to reply

#1
valentine1968

valentine1968

    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

Advertisements


#2
DragonMaster Jay

DragonMaster Jay

    Member

  • 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?

Command:


Columns("A:A").EntireColumn.AutoFit
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

#3
Jonesey

Jonesey

    Member

  • 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