Foxtable(狐表)用户栏目专家坐堂 → [求助]怎样一键删除所有表中单元格内的空行


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

主题:[求助]怎样一键删除所有表中单元格内的空行

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


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2016/8/14 12:45:00 [显示全部帖子]

For Each t As Table In Tables
    For Each r As Row In t.rows
        For Each c As Col In t.cols
            r(c.name) = Cstr(r(c.name)).Replace(chr(10), "").Replace(chr(13), "")
        Next
    Next
Next


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


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2016/8/14 16:58:00 [显示全部帖子]

For Each t As Table In Tables
    For Each r As Row In t.rows
        For Each c As Col In t.cols
            Dim ary() As String = cstr(r(c.name)).split(new Char() {chr(10), chr(13)})
            Dim str As String = ""
            For Each s As String In ary
                If s.trim > "" Then
                    str &= s & vbcrlf
                End If
            Next
            r(c.name) = str
        Next
    Next
Next

 回到顶部