以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  合计问题  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=148952)

--  作者:哈哈哥
--  发布时间:2020/4/19 18:47:00
--  合计问题
对新生成的表除时间列外的所有列进行合计,代码该如何表示    这个代码不对,除时间列的所有列该如何表示,  请指教。
Tables("窗口1_Table1").Cols("*").GrandTotal = True 
Tables("窗口1_Table1").GrandTotal = True \'显示合计模式

--  作者:有点蓝
--  发布时间:2020/4/19 22:52:00
--  
只有数值列才可以合计
Dim t As Table = Tables("窗口1_Table1")
For Each c As Col In t.Cols
    If c.IsNumeric Then
        c.GrandTotal = True
    End If
Next
t.GrandTotal = True \'显示合计模式