Solved

Export data from excel to a space delimited file

Posted on 2013-05-30
2
1,122 Views
Last Modified: 2013-05-31
I have a spreadsheet that I have adjusted the column widths to prepare the file to be space delimited.

If I save the file as prn file it wraps the text to the line below and this is due to the prn file limitation of 240 characters.

This is what I need the column widths to be to create a space delimited file.

Field      Start      column width
1      1      3
2      4      9
3      13      9
4      22      50
5      72      50
6      122      1
7      123      9
8      132      9
9      141      9
10      150      9
11      159      9
12      168      2
13      170      5
14      175      2
15      177      2
16      179      4
17      183      15
18      198      1
19      199      1
20      200      1
21      201      2
22      203      20
23      223      6
24      229      9
25      238      1
26      239      1
27      240      1
28      241      1
29      242      1
30      243      1
31      244      1
32      245      1
33      246      1


Each column can have either character or numbers in but not exceeding the column widths.

I tried a script Microsoft provide on their website at the following address but it then put field 2 start at position 5.

http://support.microsoft.com/kb/249885

I have attached my original xlsx and the prn file.

Thanks

Luke
test.xlsx
test.prn
0
Comment
Question by:luketr
2 Comments
 
LVL 5

Expert Comment

by:Coffinated
ID: 39209646
Perhaps you could export as comma delimited file, open it in MS word, replace all',' with single space or double space.
0
 
LVL 52

Accepted Solution

by:
Bill Prew earned 500 total points
ID: 39209760
Try changing:

delimiter = " "

to:

delimiter = ""

It looks like the script inserts a space between columns which you don't want.

~bp
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now