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("横向图表示例").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()
为什么导出后图表这么模糊呢
保存为图片不模糊。
还有导出BMP文件的背景是黑色的,如何设置导出的背景颜色
[此贴子已经被作者于2024/11/12 17:11:01编辑过]