Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Export excel file to semicolon delimited text file | Excel Discussion (Misc queries) | |||
How do I export an excel file as fixed length records | Excel Discussion (Misc queries) | |||
Export to fixed width text file | Excel Discussion (Misc queries) | |||
Weekly Transaction Processing | Excel Worksheet Functions | |||
How do I display leading zeros so I can export a fixed in Excel? | Excel Discussion (Misc queries) |