range.text.tostring()出错


using System;
//using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;   //这些是创建是已有的

//下方是要添加的
using System.IO;   //接口,接后面Directory类读取文件路径
using System.Reflection; // 引用这个才能使用Missing字段  using Excel;
using Excel = Microsoft.Office.Interop.Excel;    //处理Excle的命名空间
using Microsoft.Office.Core;
using Accessibility;
using System.Threading.Tasks;
using System.Diagnostics;


namespace ReadExcelTest
{
    class Program
    {
        //创建一个列表ColumnDB,后面用来存储Excel的某一列数据。
        public static List<string> ColumnDB = new List<string>();
        //构造一个读取Eecel的函数getColunmDB,并传替ExcelName文件名,方面主函数Main对表格进行处理
        //我这里主函数没有对表格进行进一步处理,其实可以不要
        static public void getColumnDB(string ExcelName)
        {
            Excel.Application xApp = new Excel.Application();
            Excel.Workbook openwb
                = xApp.Workbooks._Open(@"D:\大创\第一次代码\测试\hayes.xlsx",
            Missing.Value, Missing.Value, Missing.Value, Missing.Value
            , Missing.Value, Missing.Value, Missing.Value, Missing.Value
            , Missing.Value, Missing.Value, Missing.Value, Missing.Value);

            //获取选选择的工作表
            Excel.Sheets sheets = openwb.Worksheets;//读取Excel表格的标签页

            //Worksheet ws = ((Worksheet)openwb.Worksheets["Sheet1"]);//方法一:指定工作表名称读取
            Excel.Worksheet ws = (Excel.Worksheet)sheets.get_Item(1);//读取第一张表
            //Worksheet ws = (Worksheet)openwb.Worksheets.get_Item(1);//方法二:通过工作表下标读取
            ////获取工作表中的行数
            int rows = ws.UsedRange.Rows.Count;
            //获取工作表中的列数
            int columns = ws.UsedRange.Columns.Count;

            Console.WriteLine("请输入你要获取哪列数据");
            //将输入的数转换为16进制整型,输入的内容电脑默认是string,所以需要转换
            int column = Convert.ToInt16(Console.ReadLine());
            //提取对应行列的数据并将其存入数组中
            for (int i = 2; i < rows; i++)
            {
              _  string a = ((Range)ws.Cells[i, column]).Text.ToString();
                Console.WriteLine("读取的数据:" + a);//测试是否获得数据
                //添加到列表中
                ColumnDB.Add(a);
            }
            //遍历数组
            foreach (string db in ColumnDB)
            {
                Console.WriteLine("列表中的数据:" + db);//查看数组中的数据,测试是否存储成功
            }
            Console.ReadLine();

        }

        static void Main(string[] args)
        {
            string ExcelName = "a";
            //调用getcolumnDB函数
            getColumnDB(ExcelName);


        }
    }
}

斜体的部分出错了。
目的是为了找到这个Excel文件的非空行数