最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

在C#字母的增量

SEO心得admin35浏览0评论
本文介绍了在C#字母的增量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我导出我的数据转换成 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
发布评论

评论列表(0)

  1. 暂无评论