Export file to CSV delimited with fixed field length

G

Guest

Hi there!

I have an Excel file with a series of fields, each in one column.

What I need to do is determine a fixed length for each of these fields, so
that when I export this file to a CSV file, I get a file in which each column
has exactly the same fixed length.

For example, if my Excel file contains:

A B C
1234 ABC21 1234

and I want fields to have these fixed lengths:
A - 5
B - 6
C - 4

my CSV file should contain:
1234 ;ABC21 ;1234

Any easy way of accomplishing this? I tried custom cells but when exporting,
I lose the information.

Thanks in advance.
 
E

Earl Kiosterud

Plucky,

Generally, you use fixed fields without the commas (fixed-length), or
variable-length fields with the commas (delimited). You're wanting to do
both. Are you sure? Why? Before you go to a lot of trouble, you should
probably manually make a small test file with NotePad, and see how the
program that will eventually read the file does with it.

There's a way, using the prn format in Excel's Save as, to do the
fixed-length. I think folks have had pretty good luck with it.

Both these issues are discussed at www.smokeylake.com/excel.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top