Solved

Export data from excel to a space delimited file

Posted on 2013-05-30
2
1,100 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
Comment Utility
Perhaps you could export as comma delimited file, open it in MS word, replace all',' with single space or double space.
0
 
LVL 51

Accepted Solution

by:
Bill Prew earned 500 total points
Comment Utility
Try changing:

delimiter = " "

to:

delimiter = ""

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

~bp
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

771 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

10 Experts available now in Live!

Get 1:1 Help Now