Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Export data from excel to a space delimited file

Posted on 2013-05-30
2
Medium Priority
?
1,376 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 59

Accepted Solution

by:
Bill Prew earned 2000 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

916 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