|
Hi all, I trying to loop through an Excel spreadsheet. The first
record holds the column titles. So I need to loop through the columns checking
the values and matching them up to the array shown below. The problem I’m having is getting the column value
with the column title as a variable and analyzing it. Dim arrStrTableFields1(7) Dim arrStrTableFields2(7) arrStrTableFields1(1) = "Asset_ID" arrStrTableFields1(2) = "Status" arrStrTableFields1(3) = "Material" arrStrTableFields1(4) = "Diameter" arrStrTableFields1(5) = "US_Invert_Level" arrStrTableFields1(6) = "DS_Invert_Level" arrStrTableFields1(7) = "Depth_of_cover" Select * From tempAttributeTable Where ROWID=1 into
tblTempColumns For y = 1 to TableInfo(tblTempColumns,TAB_INFO_NCOLS) strColumnName
= ColumnInfo(tblTempColumns, " For
x = 1 to UBound(arrStrTableFields1) ‘*********This
is the problem here, accessing the column through a variable If
(tblTempColumns.strColumnName = arrStrTableFields1(x))Then arrStrTableFields2(x)
= strColumnName End
If Next Next Hayden Fisher |
_______________________________________________ MapInfo-L mailing list [email protected] http://www.directionsmag.com/mailman/listinfo/mapinfo-l
