以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 表格内的内容筛选和计算 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=143480) |
-- 作者:sjf1234 -- 发布时间:2019/11/26 12:59:00 -- 表格内的内容筛选和计算 ![]() 请求老师帮忙做一个筛选,工作出勤一列中,如果出差,则在出差列自动写入出差天数。 |
-- 作者:有点蓝 -- 发布时间:2019/11/26 13:44:00 -- datacolchanged事件 If e.DataCol.name = "工作出勤" If e.newvalue Like "出差*" Then Dim idx As Integer = e.newvalue.LastIndexOf(" ") If idx > -1 Then e.DataRow("出差") = e.newvalue.substring(idx) End If End If End If |
-- 作者:sjf1234 -- 发布时间:2019/11/26 15:34:00 -- If e.DataCol.name = "工作出勤" If e.newvalue Like "出差*" Then Dim idx As Integer = e.newvalue.LastIndexOf(" ") If idx > -1 Then e.DataRow("出差") = e.newvalue.substring(idx) End If End If End If 老师刚才这个忘记说了,出差列需要计入为数字型的数字,方便后期统计,麻烦老师在帮我改下,谢谢! |
-- 作者:有点蓝 -- 发布时间:2019/11/26 15:43:00 -- e.DataRow("出差") = val(e.newvalue.substring(idx).trim("天")) |