C# Excel-绑定序列名称
我是C语言中excel的新手,但我需要从一个范围或单元格值绑定序列名称。以下代码不适用于我。有什么建议吗C# Excel-绑定序列名称,c#,excel,C#,Excel,我是C语言中excel的新手,但我需要从一个范围或单元格值绑定序列名称。以下代码不适用于我。有什么建议吗 Excel.Series serie = seriesCollection.NewSeries(); serie.Name = xlWorkSheet.Range[xlWorkSheet.Cells[1, j], xlWorkSheet.Cells[1, j+1]].Value.ToString(); 我已经解决了这个问题,给出了类似字符串的方程,比如 se
Excel.Series serie = seriesCollection.NewSeries();
serie.Name = xlWorkSheet.Range[xlWorkSheet.Cells[1, j], xlWorkSheet.Cells[1, j+1]].Value.ToString();
我已经解决了这个问题,给出了类似字符串的方程,比如
serie.Name="=Tabelle1!$A$1" ;
因此,序列名称将自动绑定。对于迭代计算,我使用了这种形式
foreach (GraphFile file in files)
{
int count = file.Points.Count;
Excel.Series serie = seriesCollection.NewSeries();
//Bind serie name from excel sheet
serie.Name = "=" + sheet_name + "!$" + (char)char_Value + "$1";
char_Value += 2;
}