How do you convert a numerical number to an Excel column name in C# without using automation getting the value directly from Excel.
Excel 2007 has a possible range o
In perl, for an input of 1 (A), 27 (AA), etc.
sub excel_colname { my ($idx) = @_; # one-based column number --$idx; # zero-based column index my $name = ""; while ($idx >= 0) { $name .= chr(ord("A") + ($idx % 26)); $idx = int($idx / 26) - 1; } return scalar reverse $name; }