Excel_workbook.ActiveChart.SetSourceData(Excel_workbook.Sheets[Sheet1].Range[A1:

Excel_workbook.ActiveChart.SetSourceData(Excel_workbook.Sheets['Sheet1'].Range['A1:A10'], xlColumns);这句代码中SetSourceData的第一个参数能否与数据集关联?即根据数据集的数据显示图表在excel中。
[175 byte] By [yundanfengqing-云淡风轻] at [2007-12-16]
# 1
看来,除了将数据集的数据一个个往excel的cell里填以外,没有好办法了:(
# 2
With Automation, you can use several approaches for transferring your data:
Transfer data cell by cell
Transfer data in an array to a range of cells
Transfer data in an ADO recordset to a range of cells using the CopyFromRecordset method
Create a QueryTable on an Excel worksheet that contains the result of a query on an ODBC or OLEDB data source
Transfer data to the clipboard and then paste the clipboard contents into an Excel worksheet