View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JNW JNW is offline
external usenet poster
 
Posts: 480
Default Export file as a fixed width file

I assume that when you say fixed width that the columns will each have
information that is the same width (i.e. col. a = 5 characters, col. b 15
characters, etc.)

You could find the longest string in each column then do a len(cell.value)
and append a certain number of spaces. I'm not exactly sure how the syntax
would work, but hopefully that can get you started.
--
JNW


"Ed Peters" wrote:

Hi,

The link below (a very usefull site!) shows how to export a delimited
file.

http://www.cpearson.com/excel/ImpText.aspx

However I need to export as a fixed width file.

Any ideas.

Thanks,

Ed