问题:如何将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";
答案 0 :(得分:0)
你错过了行号?
ws.Cells["AA1"].Value = "MyColumn";