× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Bill,

  Is there a parameter or some sort of workaround that would allow this
>  field to show up in the CSV file with this cell defined as a label? Or
>  am I barking up the wrong tree in using the CPYTOIMPF command? 

The problem isn't with CPYTOIMPF.  The problem is that Excel treats
the apostophe as a label identifier only during interactive data
entry.  When loading a generic text file (whether CSV or tab
delimited), any cell value which can be interpreted as a number gets
treated as a number.  This is true even if the field is enclosed in
quotation marks.

It's a feature of Excel.  :)

The problem is that CSV or delimited text files carry no explicit
formatting information, and Excel's rules are such that anything that
looks like a number is treated as one, even if it is really a zip code
(previously) with leading zeros.

Once loaded, you can highlight a column by clicking its header, then
use menu Format -> Cells and make the column Text.  But that doesn't
help much when you're trying to create a file for a user and you don't
want them needing to mess with formatting.

The alternative is to create a file which has the formatting
information too.  Search the archives for information on using Java to
create an actual Excel worksheet instead of a text file.  This lets
you do all kinds of things with the spreadsheet, and isn't necessarily
as hard as you might suppose.  Scott Klement has done examples, and
maybe tutorials too.

Around Office version 10 or so, Excel also started allowing XML files
which can contain some formatting information too.  So if you only use
recent enough versions of Excel, you can still output text if you do
it in XML style with the proper tags for formatting.  However, the
Java method will allow you to be compatible to older Excel versions.

Doug


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.