Foxtable(狐表)用户栏目专家坐堂 → 生成图表问题


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

主题:生成图表问题

帅哥哟,离线,有人找我吗?
Hyphen
  11楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:狐神 帖子:5015 积分:25363 威望:0 精华:0 注册:2015/8/18 9:21:00
  发帖心情 Post By:2016/7/30 11:58:00 [显示全部帖子]

那就多看看编程基础:http://www.foxtable.com/webhelp/scr/0224.htm


Select Case CurrentTable.Name
    Case "统计表"
        Dim b As New XLS.Book
        Dim t As Table = Tables("统计表")
        Dim s As XLS.Sheet = b.Sheets(0)
        Dim Chart As WinForm.Chart = Forms("窗口1").Controls("Chart1")
        For c As Integer = 0 To t.Cols.Count -1 '添加列标题
            s(0, c).Value = t.Cols(c).Name
        Next
        For r As Integer = 0 To t.Rows.Count - 1 '填入数据
            For c As Integer = 0 To t.Cols.Count -1
                s(r +1, c).Value = t.rows(r)(c)
            Next
        Next
        '插入图表
        s(t.rows.Count + 2,1).Value = New XLS.Picture(Chart.Image,0,0,422,258)
        b.Save("c:\reports\test.xls")
        Dim Proc As New Process
        Proc.File = "c:\reports\test.xls"
        Proc.Start()
    Case "统计表2"
        '统计表2的代码'
End Select

 回到顶部
总数 12 上一页 1 2