getting value of column in spreadsheet

332 Views Asked by At

I am using devexpress and when I try to get value of a spreadsheet's cell using below code:

  Workbook workbook = new Workbook();
  Column firstColumn_byName = columns["A"];

I get the following error:

the name columns does not exist in the current context

1

There are 1 best solutions below

0
On

You haven't defined 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"];

Taken from: devexpress documentation