我正在使用devexpress
,当我尝试使用以下代码获取电子表格单元格的值时:
Workbook workbook = new Workbook();
Column firstColumn_byName = columns["A"];
我收到以下错误:
当前上下文中不存在名称列
答案 0 :(得分:1)
您尚未定义columns
。
Workbook workbook = new Workbook();
// Access a collection of columns.
ColumnCollection columns = workbook.Worksheets[0].Columns;
// Access the first column by its unique name.
Column firstColumn_byName = columns["A"];