我导出我的数据转换成 Excel中使用的Open XML 。现在我要像递增字母为列'A1'到'B1',......Z1,AA1。
I am exporting my data into Excel Using Open XML. now i want to increment of alphabet like as columns 'A1' to 'B1',...'Z1', 'AA1'.
我有分配A1为变量,我想增加字母为B1。
I have assign 'A1' into variable and i want to increment alphabet to 'B1'.
请通过可以提供任何方法/代码。增量字母'A1'到'B1'..'Z1,AA1
Please provide any method/code through that can increment alphabet 'A1' to 'B1'..'Z1','AA1'.
推荐答案这是可以做到:
char c1 = 'A'; c1++; // c1 is 'B' now和您可以添加编号为字符串,即使级联字符可以产生同样的方式:
and you can add the numbering as a string, even the concatenated characters can be generated the same way:
伪代码:
If Reached_Z Then Add_Another_A