以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助]导出选中行  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=104691)

--  作者:qingqian369
--  发布时间:2017/8/3 11:21:00
--  [求助]导出选中行

图片点击可在新窗口打开查看此主题相关图片如下:qq截图20170803111550.png
图片点击可在新窗口打开查看
我想要导出选择列为true的行
添加了个按钮,写了这个代码

Dim t As Table = Tables("表A")
Dim idxs As String = ""
Dim tbl As WinForm.Table
e.Form.RemoveControl("test")
tbl = e.Form.CreateTable("test", t.name, True)
e.Form.AddControl(tbl)
tbl.visible = False

For i As Integer = t.TopPosition To t.BottomPosition
    idxs &= t.Rows(i)("_Identify") & ","
Next
Dim nt As Table = tbl.Table
nt.Filter = "_Identify in (" & idxs.Trim(",") & ")"
tbl.Table.saveExcel("d:\\123.xls", "test")

结果是指导出我鼠标选中的行,求问应该怎么改

--  作者:有点甜
--  发布时间:2017/8/3 11:38:00
--  

Dim t As Table = Tables("表A")
Dim idxs As String = ""
Dim tbl As WinForm.Table
e.Form.RemoveControl("test")
tbl = e.Form.CreateTable("test", t.name, True)
e.Form.AddControl(tbl)
tbl.visible = False

Dim nt As Table = tbl.Table
nt.Filter = "选择 = true"
tbl.Table.saveExcel("d:\\123.xls", "test")


--  作者:有点甜
--  发布时间:2017/8/3 11:40:00
--  

直接写也可以

 

Dim t As Table = Tables("表A")
t.Filter = "选择 = true"
t.saveExcel("d:\\123.xls", "test")


--  作者:qingqian369
--  发布时间:2017/8/3 11:45:00
--  [求助]
嗯呢,好了,谢谢