static readonly string[] Columns = new[] { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "AA", "AB", "AC", "AD", "AE", "AF", "AG", "AH", "AI", "AJ", "AK", "AL", "AM", "AN", "AO", "AP", "AQ", "AR", "AS", "AT", "AU", "AV", "AW", "AX", "AY", "AZ", "BA", "BB", "BC", "BD", "BE", "BF", "BG", "BH" }; public static string IndexToColumn(int index) { if (index < 0) throw new IndexOutOfRangeException("index must be a positive number"); return Columns[index]; }
Description
- The above coding used to change from 1,2,3,4 into A,B,C,D.
- This coding normally used in excel spreadsheet to identify column numbering.
- Method to used it, first copy this coding. Then call this public string with name “IndexToColumn”.
Greetings! Very helpful advice within this article! It is the little changes that produce the most significant changes. Thanks for sharing!|
Thanks for sharing this post.So useful!
Hi,That nice post Tks
I just want to say I am just new to blogging and really enjoyed this blog site. Almost certainly I’m want to bookmark your blog . You surely come with incredible posts. Kudos for sharing with us your web-site.
It’s going to be finish of mine day, however before ending I am reading this enormous
paragraph to improve my experience.
Excellent post. I absolutely love this website. Thanks!
Very good article. I will be dealing with some of these issues as well..