他是ABCD.....XYZAAABAC.............这样排下去的,把cell(x,y)的y值除以26换算一下就可以了
string strCol="";
while (Y>26)
{
if (Y%26>0)
strCol=Convert.ToChar(64+Y%26)+strCol;
else
strCol=Convert.ToChar(64+26)+strCol;
Y=Y/26;
}
if (Y%26>0)
strCol=Convert.ToChar(64+Y)+strCol;
else
strCol=Convert.ToChar(64+26)+strCol;
string strCol="";
while (Y>26)
{
if (Y%26>0)
strCol=Convert.ToChar(64+Y%26)+strCol;
else
strCol=Convert.ToChar(64+26)+strCol;
Y=Y/26;
}
if (Y%26>0)
strCol=Convert.ToChar(64+Y)+strCol;
else
strCol=Convert.ToChar(64+26)+strCol;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货