你可以通过遍历所有的Columns,通过Column.Lable来判断该列是不是你需要的列
- this.fpSpread1.Sheets[0].Columns.Count = 3;
- this.fpSpread1.Sheets[0].Rows.Count = 3;
- this.fpSpread1.Sheets[0].Columns[0].Label = "Name";
- foreach (Column item in fpSpread1.Sheets[0].Columns)
- {
- if (item.Label.Equals("Name"))
- {
- //this.fpSpread1.Sheets[0].Cells[0, item.Index].Value;
- }
- }
复制代码 |