Write a Program to Return Excel Sheet Column Header Name if Input is a Number

input

           -11
              1
            26
            52
            28
           702
           703

output

input number -11 is invalid
input number 1 , output alphabet A
input number 26 , output alphabet Z
input number 52 , output alphabet AZ
input number 28 , output alphabet AB
input number 702 , output alphabet ZZ
input number 703 , output alphabet AAA

 public static string ConvertToAlphabet(int number)
        {
            int temp = number;
            char[] alphabets = new char[] { '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' };
            string Alphabet = string.Empty;
            int Index = 0;

            if (number <= 0)
            {

                Console.WriteLine("input number {0} is invalid", temp);

                return string.Empty;
            }

            if (number < 27)
            {

                Console.WriteLine("input number {0} , output alphabet {1}"
                    , temp, alphabets[number - 1]);

                return alphabets[number - 1].ToString();
            }
            while (number > 0)
            {
                Index = number % 26;
                number = number / 26; ;

                if (Index == 0)
                {
                    Index = 26;
                    number = number - 1;
                }
                Alphabet = alphabets[Index - 1] + Alphabet;

            }

            Console.WriteLine("input number {0} , output alphabet {1}"
                , temp, Alphabet);
            return Alphabet;
        }