要在运行时设置excel图表的动态数据,而不是Excel.Range [英] To set dynamic data of excel chart at runtime and not Excel.Range
问题描述
我想为Excel图表设置数据,但不能在任何范围内显示数据。
所以我不能使用以下功能:
chart.SetSourceData范围,XlRowCol)
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)
我已经听过这个系列,但不知道如何使用它
我有一个列表与LT; INT>列表
整数
,并希望在singe列上显示每个整数值的列图。
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.
请帮助我。任何代码或建议都可以做。
thnx提前
Please help me. Any code or suggestions will do.
thnx in advance
推荐答案
列表是一个数组吗?您可以将1D数组分配给图表系列的.XValues和.Values。您必须一次填充多个系列。
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.
这篇关于要在运行时设置excel图表的动态数据,而不是Excel.Range的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!