dlz=: }.~ =& 0 i. 0:
a. {~ 65 + dlz  (10$ 26) #: 47256
CRXO

On Mon, Oct 21, 2013 at 3:30 AM, Linda Alvord <[email protected]>wrote:

> ]N=:26 #.S=: _65+ a.i.'MAYBE'
> 5499966
>    $S
> 5
>    (65+(5#26)#: 5499966){a.
> MAYBE
>
>
> -----Original Message-----
> From: [email protected] [mailto:
> [email protected]] On Behalf Of Raul Miller
> Sent: Monday, October 21, 2013 3:57 AM
> To: Programming forum
> Subject: Re: [Jprogramming] converting excel column name to/from number
>
> Are you willing to limit yourself to a specific number of "excel digits"?
>
> Thanks,
>
> --
> Raul
>
>
> On Mon, Oct 21, 2013 at 3:35 AM, June Kim (김창준) <[email protected]>
> wrote:
> > A different, but more procedural approach is:
> >
> >    efn2=.'ABCDEFGHIJKLMNOPQRSTUVWXYZ'{~[:}.((<.@%&26 , 26&|) @ <:@{. ,
> > }.)^:(0~: {.)^:_
> >
> > , and I don't like it much. :(
> >
> >
> >
> > On Mon, Oct 21, 2013 at 10:52 AM, June Kim (김창준) <[email protected]>
> wrote:
> >
> >> Hi
> >>
> >> A SW dev company posted its hiring post on its site and there is a
> coding
> >> program for the applicants. You can choose any language you want.
> >>
> >> The problem is:
> >>
> >> Write a code that converts an order number to the excel column name. The
> >> number starts from 1.
> >>
> >> e.g. 1->A, 2->B, 26->Z, 27->AA, ...
> >>
> >> Having no intention for applying, I thought this was a simple but
> >> interesting and authentic problem. Here is my solution (I included the
> >> inverse function as well for the fun):
> >>
> >>    f=.26&#.
> >>    efn=.'ABCDEFGHIJKLMNOPQRSTUVWXYZ' {~ }.@(1&, -&.f 1 #~ #)@(f inv)
> >>    nfe=.[:f ' ABCDEFGHIJKLMNOPQRSTUVWXYZ'&i.
> >>
> >>    efn 65535
> >> CRXO
> >>    nfe 'CRXO'
> >> 65535
> >>
> >> Could you come up with simpler and more elegant solution? I'd like to
> see
> >> your solutions.
> >>
> >> June
> >>
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Skip Cave
Cave Consulting LLC
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to