Dim TabTemp As New DataTable
Dim MyColumn As DataColumn
Dim MyRow As DataRow
Dim AryTemp(,) As String
Dim i As Int32 = 0
Dim ii As Int32
ReDim AryTemp(DstTemp.Tables(0).Columns.Count, DstTemp.Tables(0).Rows.Count)
For Each MyColumn In DstTemp.Tables(0).Columns
ii = 1
AryTemp(i, 0) = i
For Each MyRow In DstTemp.Tables(0).Rows
AryTemp(i, ii) = MyRow(i)
Response.Write(AryTemp(i, ii))
ii += 1
Next
i += 1
Response.Write("<br>")
Next
'创建新表
For i = 0 To DstTemp.Tables(0).Rows.Count
TabTemp.Columns.Add(New DataColumn(i))
Next
For i = 0 To DstTemp.Tables(0).Columns.Count
MyRow = TabTemp.NewRow()
For ii = 0 To DstTemp.Tables(0).Rows.Count
MyRow(ii) = AryTemp(i, ii)
Next
TabTemp.Rows.Add(MyRow)
Next