Forum Moderators: coopster

Message Too Old, No Replies

Create a flat file from EXCEL

Flat File Spaces not comas

         

jorgjen

7:27 am on Sep 21, 2004 (gmt 0)



I need to create a flat file for a program to run against to load Ledger information. Basically I need to ensure that column 1 takes up 10 spaces regardless of how many characters are present, and column 2 takes up 5 spaces etc.

Does anyone know how I can do this?

coopster

12:18 pm on Sep 21, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, jorgjen!

If the data isn't formatted the way you like coming out of the spreadsheet, then run it through your own formatting utility. Create a simple script in PHP that will read the file into memory, pad the values [php.net], and write the file back out.

Jon_King

12:41 pm on Sep 21, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Exporting to HTML from Excel will maintain the column width by padding or truncating the cell contents.