在C#字母的增量

编程入门 行业动态 更新时间:2024-10-26 04:29:56
本文介绍了在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

更多推荐

在C#字母的增量

本文发布于:2023-11-30 10:00:06,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1649582.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:增量   字母

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!