Foxtable(狐表)用户栏目专家坐堂 → [求助] 自动计算


  共有1723人关注过本帖树形打印复制链接

主题:[求助] 自动计算

帅哥哟,离线,有人找我吗?
yupeng
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:小狐 帖子:350 积分:2927 威望:0 精华:0 注册:2015/4/23 19:53:00
[求助] 自动计算  发帖心情 Post By:2016/12/27 15:25:00 [只看该作者]

Dim str1 As String = ""
Dim t As Table = CurrentTable

Str1 = Str1 & "计行数:" & t.Aggregate(AggregateEnum.Count, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "累计:" & t.Aggregate(AggregateEnum.Sum, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "平均:" & t.Aggregate(AggregateEnum.Average, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "最大:" & t.Aggregate(AggregateEnum.Max, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "最小:" & t.Aggregate(AggregateEnum.Min, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "

StatusBar.Message3 = str1

 

 

老师  我有一表的其中一例的字符串有32位  当我鼠标放到此单元格时就出错   

 

我想写个判断   不计算字符串起过10位以上的单元格   或者不计算字符串的例   

 

请问要怎样写代码   谢谢您

[此贴子已经被作者于2016/12/27 15:26:40编辑过]

 回到顶部
帅哥哟,离线,有人找我吗?
有点色
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:13837 积分:69650 威望:0 精华:0 注册:2016/11/1 14:42:00
  发帖心情 Post By:2016/12/27 15:43:00 [只看该作者]

Dim t As Table = CurrentTable
Dim str1 As String = ""
Dim flag As Boolean = True
For i As Integer = t.LeftCol To t.RightCol
    If t.cols(i).IsNumeric = False Then
        flag = False
    End If
Next
If flag Then
    Str1 = Str1 & "计行数:" & t.Aggregate(AggregateEnum.Count, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
    Str1 = Str1 & "累计:" & t.Aggregate(AggregateEnum.Sum, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
    Str1 = Str1 & "平均:" & t.Aggregate(AggregateEnum.Average, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
    Str1 = Str1 & "最大:" & t.Aggregate(AggregateEnum.Max, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
    Str1 = Str1 & "最小:" & t.Aggregate(AggregateEnum.Min, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
End If
StatusBar.Message3 = str1

 

 


 回到顶部