× 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.



Whoops! Just after I said you have to be careful, I wasn't:

On Thu, Nov 12, 2015 at 3:44 PM, John Yeung <gallium.arsenide@xxxxxxxxx> wrote:

For example, if you've got a Boston area code like '02108', it could
be stored in Excel as character '02108', in which case you use it
as-is; or it could be in Excel as float 2108.0, in which case you do
something like

myvar = %char(%int(xlvar));

The above loses leading zeros. What you REALLY need to do is, if
you're lucky enough to have a column that is exactly the right size,
zero-fill the column. I believe you can use %EDITC with edit code 'X'.

If your column is not exactly the right size (that is, if the value
can be character, with a total length less than the size of the
column), then you are either completely screwed (no way to retrieve
the leading zeros) or if you're lucky, the value *looks right* in
Excel, meaning you might be able to use the formatting information to
deduce the length.

John Y.

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.