1

Possible Duplicate:
How to convert a column number (eg. 127) into an excel column (eg. AA)

How convert number to base26 column string for excel. lang perl

1
  • 1
    This is not rent-a-coder. You should be able to translate these few simple lines. Commented Jul 6, 2010 at 16:51

2 Answers 2

4

Number::Latin

Sign up to request clarification or add additional context in comments.

Comments

2

If it's something quick and dirty, the following sub may be useful.

sub column2base26 {

    my $column = shift;
    die "Column $column must be positive" unless $column > 0;

    my $string = 'A';
    $string++ for 2..$column;
    return $string;
}

print column2base26($_), "\n" foreach (23, 15, 333);

# Output:
# W
# O
# LU

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.