Foxtable(狐表)用户栏目专家坐堂 → 图表不清晰


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

主题:图表不清晰

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


加好友 发短信
等级:小狐 帖子:394 积分:6003 威望:0 精华:0 注册:2015/2/17 10:18:00
图表不清晰  发帖心情 Post By:2018/7/16 19:32:00 [显示全部帖子]

用如下代码,把同一窗口生存的3个图表文件保存到电子表格中,很不清晰。

请教老师,如何修改代码,把3个图表文件先保存为WMF格式,再插入到自动保存到电子文件中。

Dim b As New XLS.Book
Dim t As Table = Tables("表D")
Dim s As XLS.Sheet = b.Sheets(0)
Dim Chart As WinForm.Chart = Forms("按科室统计").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

图片点击可在新窗口打开查看此主题相关图片如下:360截图20180716192301232.jpg
图片点击可在新窗口打开查看

's(t.rows.Count + 2,1).Value = New XLS.Picture(Chart.Image,0,0,422,258)
Dim Chart1 As WinForm.Chart = Forms("按科室统计").Controls("Chart1")
s(t.rows.Count + 2,1).Value = New XLS.Picture(Chart1.Image,0,0,422,258)
Dim Chart2 As WinForm.Chart = Forms("按科室统计").Controls("Chart2")
s(t.rows.Count + 20,1).Value = New XLS.Picture(Chart2.Image,0,0,422,258)
Dim Chart3 As WinForm.Chart = Forms("按科室统计").Controls("Chart3")
s(t.rows.Count + 40,1).Value = New XLS.Picture(Chart3.Image,0,0,422,258)


b.Save("c:\test.xls")
Dim Proc As New Process
Proc.File = "c:\test.xls"
Proc.Start()

 回到顶部