Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting an .xls/.csv file to Fixed Width 1

Status
Not open for further replies.

silverdragoncub

Technical User
Dec 10, 2002
5
US
I have some files that are either in .xls or .csv format. I need to convert them to fixed width so I can load them into a database. I'm not sure how to do this. And I've never used Visual Basic before.

Um...I have Excel 2000 if that matters.

Any help?
 
You could import the files into Access and then export them as a text file. After you import the file right click and choose export and then choose a text extension. At the first step of the export wizard choose fixed length and choose the advance choice. Then you can set the field lengths you wish and save the format for the next time. You will then have a fixed length file to import to your data base. If your data base has specific field lengths be aware and set your field lengths accordingly..

Ken
 
Hi,
If you format your Excel sheet with Courier New 8 pt font. the column width of each column the number of fixed characters you need, then save the file as a .prn file (print file) - (Actually only saves the sheet)

VOLA! Skip,
SkipAndMary1017@mindspring.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top