1

I have a list that is filtered from SQL and an excel sheet that stocks them. In that list I have a column named A. If that column exists, a comment should appear at the header of that column. Its position might change, so I can't use this:

int commentIndex = worksheet.Comments.Add("F5");
Comment comment = worksheet.Comments[commentIndex];
comment.Note = "Hello Aspose!";

Here is my column

if (dt.Columns[i].ColumnName==A)
{
    // code to be filled
}

dt=data table that has the columns from SQL.

krlzlx
  • 5,752
  • 14
  • 47
  • 55

1 Answers1

1

Here is I did it and solved the issue:

int commentIndex = ws.Comments.Add(0, i);
    Aspose.Cells.Comment comment = ws.Comments[commentIndex];
comment.Note = "Blalala";