Click or drag to resize
SheetOpenCell Method
Opens the specified cell and returns a Cell object.

Namespace: Aceoffix.ExcelReader
Assembly: Aceoffix (in Aceoffix.dll) Version: 5.0.0.1
Syntax
public Cell OpenCell(
	string CellAddress
)

Parameters

CellAddress
Type: SystemString

The A1-style notation is defined in Microsoft Excel. For example: "A1".

Note Note

Note: There is a limit that the maximum number of columns per worksheet is 676 and the maximum number of rows is 65,536 in Excel2003 and earlier versions. Please do not exceed the maximum number of columns when input the parameter of CellAddress.

Return Value

Type: Cell
Return a Cell object.
Remarks
If the specified Cell exists, this method will return the Cell object.
Examples
The following code example shows how to use the OpenCell method to get the value of the specified cell.
Aceoffix.ExcelReader.Workbook wb = new Aceoffix.ExcelReader.Workbook();
Aceoffix.ExcelReader.Sheet sheet1 = wb.OpenSheet("sheet1");

string strCompanyName = sheet1.OpenCell("D1").Value;
string strProductName = sheet1.OpenCell("D2").Value;
string strProductCode = sheet1.OpenCell("D3").Value;

string strAddress = sheet1.OpenCell("F6").Value;

//After you get the value, you can save them to the database.

wb.Close();
See Also