Problems exporting space delimited text from excel

A

AHo

Since I extensively use Excel Macros to prepare and process files to
be passed on to a number of bioinformatics programs (sequence
alignments in GCG format, 3D-structures in PDB format and so on), I
frequently need to export files as space delimited text, as many of the
standard formats rely on fixed field widths and record lengths. This
worked fine under the older versions of Excel.
Under Excel 2004, specification of column widths is in physical units
(cm or inches) rather than in numbers of characters as in older
versions of Excels.

If such a worksheet, created in Excel 2004, is exported using "save as
formatted text (space delimited)", the resulting file contains only the
first column of the worksheet (if the selection was on a single cell)
or the whole worksheet as tab delimited text, it seems not possible to
actually export as space delimited text.

Older worksheets, in which the column width was set in "number of
characters" units under an older version of Excel, or worksheets in
which the column width has been specified in "number of characters"
units using a Macro are correctly exported as space delimited text by
Excel2004, the problem therefore seems to reside in the specification
of the column widths.

Is there any place there on can specify that column widths are to be
interpreted in the "old-fashioned way"? Is there another workaround? It
is quite a nuissance to have to write a formatting macro every time on
has to format a space delimited text!!!
 
J

JE McGimpsey

AHo said:
Is there any place there on can specify that column widths are to be
interpreted in the "old-fashioned way"?

Select your columns. Hover the cursor over a boundary between column
headers until it turns into a bar with two arrows. Click. You'll now see
a screen tip with the column width in character units (and inches/cm in
parens). Adjust as needed.

An alternative, since you're "extensively us(ing) Excel Macros" anyway,
is to generate the fixed field file directly. See

http://www.mcgimpsey.com/excel/textfiles.html#fixedfield
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top