此主题相关图片如下:360截图20180716082931921.jpg
在窗口1中有职工表
根据职工表生存3个图表 CHART1,CHART2,CHART3
请教:如何将职工表和3个图表导出到同一个电子表格文件中(不是导到不同的文件)。
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:\test.xls")
Dim Proc As New Process
Proc.File = "c:\test.xls"
Proc.Start()