<p>How would you determine the column name (e.g. "AQ" or "BH") of the nth column in Excel?</p>

<p>Edit: A language-agnostic algorithm to determine this is the main goal here.</p>

I once wrote this function to perform that exact task:
```
```
public static string Column(int column)
{
    column--;
    if (column >= 0 && column < 26)
        return ((char)('A' + column)).ToString();
    else if (column > 25)
        return Column(column / 26) + Column(column % 26 + 1);
    else
        throw new Exception("Invalid Column #" + (column + 1).ToString());
}
```
```