C# 클래스 Smrf.AppLib.ExcelTableReader

Reads rows from an Excel table.
Use GetRows to iterate the rows of an Excel table. Filtered rows are automatically skipped, and the rows are buffered internally to eliminate having to make a slow COM interop call to get each row.

A collection of the column names in the table is available via the property.

Note that although this class is optimized for reading a table, the property allows you to write to the cells in a row as well. However, each such write operation incurs the overhead of a COM call, so this class should not be used when there are hundreds of cells that need to be written to.

상속: Object
파일 보기 프로젝트 열기: 2014-sed-team3/term-project 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
m_aoCurrentSubrangeValues ].Object[
m_iCurrentRowOneBased System.Int32
m_oColumnIndexesOneBased Int32>.Dictionary
m_oCurrentSubrange Range
m_oTable ListObject

공개 메소드들

메소드 설명
ExcelTableReader ( ListObject table ) : System

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.

GetRows ( ) : IEnumerable

보호된 메소드들

메소드 설명
GetRangeForCellInCurrentRow ( String sColumnName ) : Range
TryGetDoubleFromCellInCurrentRow ( String sColumnName, Double &dDouble ) : System.Boolean
TryGetInt32FromCellInCurrentRow ( String sColumnName, Int32 &iInt32 ) : System.Boolean
TryGetNonEmptyStringFromCellInCurrentRow ( String sColumnName, String &sNonEmptyString ) : System.Boolean

비공개 메소드들

메소드 설명
AssertValid ( ) : void

메소드 상세

ExcelTableReader() 공개 메소드

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. ///
리턴 System

GetRangeForCellInCurrentRow() 보호된 메소드

protected GetRangeForCellInCurrentRow ( String sColumnName ) : Range
sColumnName String
리턴 Range

GetRows() 공개 메소드

public GetRows ( ) : IEnumerable
리턴 IEnumerable

TryGetDoubleFromCellInCurrentRow() 보호된 메소드

protected TryGetDoubleFromCellInCurrentRow ( String sColumnName, Double &dDouble ) : System.Boolean
sColumnName String
dDouble Double
리턴 System.Boolean

TryGetInt32FromCellInCurrentRow() 보호된 메소드

protected TryGetInt32FromCellInCurrentRow ( String sColumnName, Int32 &iInt32 ) : System.Boolean
sColumnName String
iInt32 System.Int32
리턴 System.Boolean

TryGetNonEmptyStringFromCellInCurrentRow() 보호된 메소드

protected TryGetNonEmptyStringFromCellInCurrentRow ( String sColumnName, String &sNonEmptyString ) : System.Boolean
sColumnName String
sNonEmptyString String
리턴 System.Boolean

프로퍼티 상세

m_aoCurrentSubrangeValues 보호되어 있는 프로퍼티

protected Object[,] m_aoCurrentSubrangeValues
리턴 ].Object[

m_iCurrentRowOneBased 보호되어 있는 프로퍼티

protected Int32,System m_iCurrentRowOneBased
리턴 System.Int32

m_oColumnIndexesOneBased 보호되어 있는 프로퍼티

protected Dictionary m_oColumnIndexesOneBased
리턴 Int32>.Dictionary

m_oCurrentSubrange 보호되어 있는 프로퍼티

protected Range m_oCurrentSubrange
리턴 Range

m_oTable 보호되어 있는 프로퍼티

protected ListObject m_oTable
리턴 ListObject