Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Plucky Duck
 
Posts: n/a
Default Export file to CSV delimited with fixed field length

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.
  #3   Report Post  
Earl Kiosterud
 
Posts: n/a
Default

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.
--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"Plucky Duck" <Plucky wrote in message
...
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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Export excel file to semicolon delimited text file capitan Excel Discussion (Misc queries) 5 April 7th 05 03:06 AM
How do I export an excel file as fixed length records iainjh Excel Discussion (Misc queries) 2 March 3rd 05 06:59 PM
Export to fixed width text file FinChase Excel Discussion (Misc queries) 0 January 24th 05 08:25 PM
Weekly Transaction Processing Ralph Howarth Excel Worksheet Functions 4 January 19th 05 06:37 AM
How do I display leading zeros so I can export a fixed in Excel? World Referee and accountant Excel Discussion (Misc queries) 2 January 3rd 05 05:18 PM


All times are GMT +1. The time now is 11:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"