Ok so I am writing a method which accepts a 2d array as a parameter. I want to put this 2d array onto an Excel worksheet but I need to work out the final cell location. I can get the height easily enough like so:
var height = data.GetLength(1); //`data` is the name of my 2d array
This gives me my Y axis but it's not so easy to get my X axis. Obviously I can get the number like so:
var width = data.GetLength(0);
This gives me a number, which I want to convert to a letter. So, for example, 0 is A, 1 is B and so on until we get to 26 which goes back to A again. I am sure that there is a simple way to do this but I have a total mental block.
What would you do?