Item

Cells indexer (1 of 2)

获取Cell指定单元格行索引和列索引处的元素。

public Cell this[int row, int column] { get; }
范围描述
row行索引。
column列索引。

返回值

Cell目的。

例子

[C#]
Workbook excel = new Workbook();
Cells cells = excel.Worksheets[0].Cells;
Cell cell = cells[0, 0];	//获取“A1”处的单元格

[Visual Basic]
Dim excel as Workbook = New Workbook()
Dim cells As Cells =  excel.Worksheets(0).Cells 
Dim cell As Cell =  cells(0,0)  'Gets the cell at "A1"

也可以看看


Cells indexer (2 of 2)

获取Cell指定单元格名称处的元素。

public Cell this[string cellName] { get; }
范围描述
cellName单元格名称,包括其列字母和行号,例如 A5。

返回值

一个Cell目的

例子

[C#]
Workbook excel = new Workbook();
Cells cells = excel.Worksheets[0].Cells;
Cell cell = cells["A1"];	//获取“A1”处的单元格

[Visual Basic]
Dim excel as Workbook = New Workbook()
Dim cells As Cells =  excel.Worksheets(0).Cells 
Dim cell As Cell =  cells("A1")  'Gets the cell at "A1"

也可以看看