Dim dc As DataCol
Dim lst As New List(Of String)
Dim t As Table = Tables("每日销售统计")
t.StopRedraw
Dim cnt As Integer = t.cols.Count
For i As Integer = t.cols.Count - 1 To 6 Step - 1
Dim s As String = t.cols(i).Name & " 环比"
lst.Add(s)
dc = DataTables("每日销售统计").datacols.add(s, GetType(Double), "IIf(" & t.cols(i - 1).Name & " Is null, 1, (" & t.cols(i).Name & " - " & t.cols(i - 1).Name & ") / " & t.cols(i - 1).Name & ")", t.cols(i).Caption & " 环比")
dc.SetFormat("0.00%")
Next
For Each s As String In lst
t.cols(s).Move(t.cols(s.Split(" ")(0)).Index + 1)
Next
t.AutoSizeCols
t.ResumeRedraw