Google出的含有这个方法的网址是:

http://www.mail-archive.com/poi-user@jakarta.apache.org/msg08811.html

这网站是被墙的。

下面直接贴出方法代码吧,我把它改变成了C#代码,佩服这些涉及数学方面的算法的作者。当然我的老师的数学功力也是我一直顶礼膜拜,只能望其项背,唏嘘感慨的……唉,那个家伙啊!

 1 private int colNameToNum(string colName)
2 {
3 // assume the column name is of uppercase characters
4 int result = 0;
5 for (int i = 0; i < colName.Length; i++)
6 {
7 result = result * 26 + colName[i] - 65 + 1;
8 }
9 return result;
10 }

  

相关文章:

  • 2021-08-15
  • 2021-06-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-28
  • 2021-10-15
  • 2022-12-23
  • 2021-12-06
猜你喜欢
  • 2021-12-12
  • 2022-12-23
  • 2021-11-06
  • 2022-12-23
  • 2022-12-23
  • 2021-11-16
  • 2022-01-03
相关资源
相似解决方案