Smrf.AppLib.ExcelTableReader.ExcelTableReader C# (CSharp) Méthode

ExcelTableReader() public méthode

Initializes a new instance of the ExcelTableReader class.
If table has hidden columns, an exception is thrown. Use the ExcelColumnHider class to temporarily show all hidden columns if necessary.
public ExcelTableReader ( ListObject table ) : System
table ListObject /// The table to read. The table must have no hidden columns. ///
Résultat System
    public ExcelTableReader
    (
        ListObject table
    )
    {
        Debug.Assert(table != null);

        m_oTable = table;

        m_oColumnIndexesOneBased = new Dictionary<String, Int32>();
        ListColumns oColumns = table.ListColumns;
        Int32 iColumns = oColumns.Count;

        for (Int32 i = 1; i <= iColumns; i++)
        {
            String sColumnName = oColumns[i].Name;

            if ( !String.IsNullOrEmpty(sColumnName) )
            {
                m_oColumnIndexesOneBased.Add(sColumnName, i);
            }
        }

        m_oCurrentSubrange = null;
        m_aoCurrentSubrangeValues = null;
        m_iCurrentRowOneBased = Int32.MinValue;

        AssertValid();
    }