我正在尝试获取 for 循环中指定的值,然后将它们用作从 Excel 获取的单元格范围。这里出了什么问题?
List<string> str = new List<string>();
// The follwing increments by 4, and starts at 25
for (int i = 25; i <= lastRow; i += 4) // += means a + b
{
str = ws.Range["B"+i].Value;
}
...
SeriesCollection seriesCollection_mySeries = xlChart.SeriesCollection();
Series series1 = seriesCollection_mySeries.NewSeries();
series1.Values = str
;