Excel_workbook.ActiveChart.SetSourceData(Excel_workbook.Sheets[Sheet1].Range[A1:
Excel_workbook.ActiveChart.SetSourceData(Excel_workbook.Sheets['Sheet1'].Range['A1:A10'], xlColumns);这句代码中SetSourceData的第一个参数能否与数据集关联?即根据数据集的数据显示图表在excel中。
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