SheetOpenCellByDefinedName Method |
Opens the cell with the specified name defined in Excel and returns a Cell object.
Namespace: Aceoffix.ExcelReaderAssembly: Aceoffix (in Aceoffix.dll) Version: 5.0.0.1
Syntaxpublic Cell OpenCellByDefinedName(
string DefinedName
)
Public Function OpenCellByDefinedName (
DefinedName As String
) As Cell
Parameters
- DefinedName
- Type: SystemString
The name defined in Excel can be a global name or a local name. This method will only be valid when the Cell has a DefinedName.
Return Value
Type:
CellReturn a Cell object.
Examples
The following code example shows how to use the OpenCellByDefinedName 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.OpenCellByDefinedName("CompanyName").Value;
string strProductName = sheet1.OpenCellByDefinedName("ProductName").Value;
string strProductCode = sheet1.OpenCellByDefinedName("ProductCode").Value;
wb.Close();
See Also