To set dynamic data of excel chart at runtime and not Excel.Range

雨燕双飞 提交于 2019-12-25 03:53:53

问题


I want to set data for Excel chart but cannot display data in any Range.
so i cannot use following function :
chart.SetSourceData(range,XlRowCol)

i have heared about the series but dont know how to use it
I am having a List<int> list of integers and want to display a column chart with each integer value on singe column.

Please help me. Any code or suggestions will do.
thnx in advance


回答1:


Is a List an array? You can assign 1D arrays to the .XValues and .Values of a chart series. You would have to populate multiple series one at a time.



来源:https://stackoverflow.com/questions/7380266/to-set-dynamic-data-of-excel-chart-at-runtime-and-not-excel-range

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!