Dim str As String ="表B"DataTables(str).DataCols.Add("排序号", Gettype(Integer))For Each r As Row In Tables(str).rows r("排序号") = r.index + 1Next