0

Question: How Can we add ws.Cells["AA"].Value = "MyColumn"; as a column name to Excel worksheet

Following works until column Z1. But I have more columns after Z column. So, if I add ws.Cells["AA"].Value = "MyColumn";, following does not work.:

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";
nam
  • 21,967
  • 37
  • 158
  • 332

1 Answers1

0

You're missing the row number?

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

Pero P.
  • 25,813
  • 9
  • 61
  • 85