Smrf.AppLib.ExcelTableReader.GetRangeForCellInCurrentRow C# (CSharp) Method

GetRangeForCellInCurrentRow() protected method

protected GetRangeForCellInCurrentRow ( String sColumnName ) : Range
sColumnName String
return Range
    GetRangeForCellInCurrentRow
    (
        String sColumnName
    )
    {
        AssertValid();

        Int32 iColumnOneBased;

        if ( !m_oColumnIndexesOneBased.TryGetValue(sColumnName,
            out iColumnOneBased) )
        {
            Debug.Assert(false);

            throw new InvalidOperationException(
                "ExcelTableReader.GetRangeForCellInCurrentRow: No such"
                + " column.");
        }

        return ( (Range)m_oCurrentSubrange.Cells[
            m_iCurrentRowOneBased, iColumnOneBased] );
    }