使用SQL处理
dim sql as string = "select QQ号,提交者,case when DatePart(weekday,提交日期) = 1 then DatePart(week,提交日期) -1 else DatePart(week,提交日期) end AS [周次],提交日期,得分 from {QQ群早起打卡统计}"
Dim g As New CrossTableBuilder("QQ群早起打卡交叉统计", sql,“数据源名称”)
g.HGroups.AddDef("QQ号")
g.HGroups.AddDef("提交者")
g.VGroups.AddDef("周次", "2021年第{0}周得分")
g.VGroups.AddDef("提交日期", DateGroupEnum.Day, "{0}日")
g.Totals.AddDef("得分", "得分")
g.HorizontalTotal = True
g.Build()
MainTable = Tables("QQ群早起打卡交叉统计")