Solved

Export data from excel to a space delimited file

Posted on 2013-05-30
2
1,265 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 56

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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

617 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