Foxtable(狐表)用户栏目专家坐堂 → 关于RecordGrid控件绑定数据


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

主题:关于RecordGrid控件绑定数据

帅哥,在线噢!
有点蓝
  41楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:106178 积分:540007 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2017/12/16 16:46:00 [只看该作者]

Dim lieming As WinForm.CheckedListBox = e.Form.Controls("CheckedListBox1")
Dim dlg As New SaveFileDialog '定义一个新的SaveFileDialog
dlg.Filter= "Excel文件|*.xlsx" '设置筛选器
If lieming.CheckedIndices.Count =0 Then
    msgbox("不能所有列都不选")
    Return
Else
    If dlg.ShowDialog = DialogResult.Ok Then '如果用户单击了确定按钮
        
        Dim sht As Table = Tables("数据列调整_Table1")
        Dim str As String = sht.getColVisibleWidth
        If lieming.value > "" Then
            For Each c As Col In sht.Cols
                c.visible = False
            Next
            For Each s As String In lieming.value.split(",")
                sht.cols(s).Visible = True
            Next
        End If
        sht.SaveExcel(dlg.FileName, "客户资料")
        sht.SetColVisibleWidth(str)
    End If
End If

 回到顶部
总数 41 上一页 1 2 3 4 5