C# 实现Excel(导出导入)非常实用的将数字转换成字母
///
/// 需要转换的行或者列
///
///
///
private static string NunberToChar(int index)
{
index = index - 1;
if (index < 0) { throw new Exception("invalid parameter"); }
List
do
{
if (chars.Count > 0) index--;
chars.Insert(0, ((char)(index % 26 + (int)'A')).ToString());
index = (int)((index - index % 26) / 26);
} while (index > 0);
return String.Join(string.Empty, chars.ToArray());
}