循环每一列,合计列的宽度,累加起来。
Dim t As Table = Tables("表A")Dim sum As Double = 0For i As Integer = 0 To t.grid.cols.count-1 If t.grid.cols(i).visible Then sum += t.grid.cols(i).widthdisplay End IfNextoutput.show(sum)