Dim i As Integer Dim dt As DataTable = DataTables("表C") Dim dc As DataCol For i = 0 To 5 dc =dt.DataCols.add("fu" &i, Gettype(String), 255) '新增列 Tables(dt.name).Cols(dc.name).Width = 70 '设列宽 Tables(dt.name).Cols(dc.name).Caption = "FoxTable-" & i '设标题名称 DataTables(dt.name).BuildHeader() Tables(dt.name).SetHeaderCellBackColor(dc.name,color.MediumSlateBlue) '设标题颜色 Next