Foxtable(狐表)用户栏目专家坐堂 → 导出文本


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

主题:导出文本

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


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

Dim str As String = ""

Dim drs As List(Of DataRow)

drs = DataTables("手册").Select("选择 = false")

For i As Integer = 0 To drs.count-1
   
    Dim dr As DataRow = drs(i)
    If dr.Isnull("章") = False Then
       
        str = str & dr("章") & dr("内容") & vbcrlf
       
    End If
   
   
   
    If dr.isnull("节") = False Then
       
        str = str & "   " & dr("节") & dr("内容") & vbcrlf
       
    End If
   
   
   
    If dr.Isnull("小节") = False Then
       
        str = str & "      " & dr("小节") & dr("内容") & vbcrlf
       
    End If
   
    If dr.isnull("一") = False Then
       
        str = str & "           " & dr("一") & dr("内容") & vbcrlf
       
    End If
   
   
Next

output.Show(str)


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


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

word是不行的,你用专业报表吧。

 

http://www.foxtable.com/help/topics/1183.htm

 


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


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

你也可以用vba插入文本,如

 

 

 

Dim app As New MSWord.Application
try
    Dim doc = app.Documents.Open("d:\test.doc")
   
    If app.ActiveWindow.Selection.Find.Execute("Test") Then
        app.Selection.font.bold = True
        app.Selection.font.size = 18
        app.Selection.TypeText(Text:="12345678")
        app.Selection.font.bold = False
        app.Selection.font.size = 8
        app.Selection.TypeText(Text:="12345678")

    End If
   
    app.Visible = True
catch ex As exception
    msgbox(ex.message)
    app.Quit
finally
   
End try


 回到顶部