WITH This * Test to see if an object already exists, If not - do it * lcSessType = VARTYPE( .r_oXlsSess ) IF lcSessType <> 'O' .r_oXlsSess = CREATEOBJECT( 'Excel.Application' ) ENDIF * Open the file, then get a reference to the First Worksheet * .r_oXlsSess.WorkBooks.Open( lcFileName ) .r_oXlsSheet= .r_oXlsSess.ActiveWorkBook.ActiveSheet * Go to the upper left corner, then the bottom of the first column * and get the last Cell (row/col) reference * .r_oXlsSess.Range("A1").Select .r_oXlsSess.Selection.End( -4121 ).Select .r_nRowTotl = .r_oXlsSess.Selection.Row * Go to the upper left corner, * Go to the right on this row till: * a) last cell with data or, * b) next cell with data * and get the last Cell (row/col) reference * .r_oXlsSess.Range("A1").Select .r_oXlsSess.Selection.End( 2 ).Select .r_nColTotl = .r_oXlsSess.Selection.Column IF VARTYPE( .r_aStruAray[ 1, 1 ] ) = 'C' .r_nColTotl = ALEN( .r_aStruAray, 1 ) ELSE l_Colhdg = .m_GetSrcDta( 1 ) IF VARTYPE( l_ColHdg ) = 'C' .r_lValidateColName = .F. .r_nStrtRow = 2 ENDIF ENDIF .r_lHeadIngs= ( .r_nStrtRow = 2 ) ENDWITH>Then, by iterating through the identified matrix limits ( .r_oXlsSess.RowTotl, .r_oXlsSess.ColTotl ), I capture the