EPPLus - Excel列名无效

时间:2017-06-09 00:00:55

标签: c# epplus epplus-4

问题:如何将ws.Cells["AA"].Value = "MyColumn";作为列名添加到Excel工作表

以下工作直至列Z1。但是我在Z列之后有更多列。因此,如果我添加ws.Cells["AA"].Value = "MyColumn";,则以下操作无效。

ws.Cells["A1"].Value = "Number";
ws.Cells["B1"].Value = "First Name";
ws.Cells["C1"].Value = "Last Name";
ws.Cells["D1"].Value = "Country";
....
....
ws.Cells["Z1"].Value = "Country";
ws.Cells["AA"].Value = "MyColumn";

1 个答案:

答案 0 :(得分:0)

你错过了行号?

ws.Cells["AA1"].Value = "MyColumn";