How to Create a Space Delimited Import File in Excel
Need to know how to easily create a Space Delimited Import File in Excel.Â
Imports
Accounts Receivable
Special Assessments (txspasmt)
A variety of programs offer the ability to import records with a space delimited file. A space delimited import file needs to be created.Â
Space Delimited Import processes require that the necessary data be in specific columns or positions within a text document. The programs import the data based on the positions that the data is in. For example, in the value 123456789, the numeral 1 is in the first position, 2 in the second position, etc.Â
There are many ways a Space Delimited Import File can be created. One way to easily create these files is in Excel using these basic steps:Â
Open Microsoft Excel.
Open the corresponding import layout document.
Treat each cell in the spreadsheet as field. Enter the desired value into the cells using the import layout document as a reference.
Highlight all the cells with an entered value.Â
RIGHT CLICK and choose Format Cells.
Select Text.Â
Click OK.Â
When all required and desired fields have been filled out and formatted, set each cell to the appropriate size as listed in the import layout document.
To do this, RIGHT CLICK on the Column Header in Excel, for example, column A.Â
Select Column Width from the dropdown.Â
Enter the size of each field listed in the import document as the Column Width.Â
Click OK.
Repeat steps a-d for each field.
When all fields have been appropriately sized, click File.
Choose Save As.
Enter the desired File name.Â
Choose to save the document as Formatted Text (Space delimited) (*.prn).Â
Click Save.
Find the newly created .prn file in the file directory.Â
RIGHT CLICK the file and select Open with and then either Notepad (comes standard on all Window's machines) or Notepad++ (recommended, but must be installed).Â
Compare the file to the import layout document and ensure that the data is in the right positions.Â
If entering values that have leading zeroes, for example, 000123, be sure to format the cells as text before beginning. Excel will drop leading zeroes in cells by default unless they are formatted correctly.Â
If the import file is longer than 240 characters per line, then the Formatted text (.prn) format will not work. Lines longer than 240 characters are wrapped onto the next line when the file is converted to the .prn format and this breaks the import file.
There is a known issue with Microsoft's Excel where right justified fields will add a space after the field when it is saved as a .prn file. Some users report that installing the most recent updates for Excel resolve this issue. A way to work around it, if possible, is to fill out all of the positions in the cell. For example, if entering 10.00 as an amount in a field that is 8 characters/positions long, enter 00010.00 instead.Â
Â