Dim g As New CrossTableBuilder("统计表1", DataTables("订单")) g.HGroups.AddDef("产品") g.VGroups.AddDef("客户", "客户_{0}") g.Totals.AddDef("数量", "数量") g.VerticalProportion = True
Tables("窗口3_Table1").DataSource = g.BuildDataSource For Each c As Col In Tables("窗口3_Table1").Cols If c.Caption Like "*_占比" Then c.DataCol.SetFormat("0.00%") End If Next