Excel – Export an Excel spreadsheet to fixed-width text file

exportfixed widthmicrosoft-excel-2003

Excel has the functionality to import fixed-width text files where it presents a dialog that lets you choose where the begins and ends of fields are which it puts into columns.

Does it also have functionality where, given an existing spreadsheet, you can export to a fixed-width text file?

If so, how do I access this? I have tried using Save As and choosing Text File but it seems to only save as Tab-delimited which doesn't help me.

This is Excel 2003 if it matters.

Best Answer

I think the closest you can get from native Excel functionality is Save As | Formatted Text (Space Delimited) (*.prn). It will automatically determine the widths and insert spaces to pad to that width as necessary.

Beyond that you need to have a macro or other add-in that will let you do more.

Related Question