Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Comments Position

Francois Botha edited this page Feb 26, 2018 · 2 revisions

Position.jpg

var wb = new XLWorkbook();
var ws = wb.Worksheets.Add("Position");

ws.Columns().Width = 10;

ws.Cell("A1").Comment.AddText("This is an unusual place for a comment...");
ws.Cell("A1").Comment.Position
  .SetColumn(3) // Starting from the third column
  .SetColumnOffset(5) // The comment will start in the middle of the third column
  .SetRow(5) // Starting from the fifth row
  .SetRowOffset(7.5); // The comment will start in the middle of the fifth row

// Set all comments to visible
ws.CellsUsed(true, c => c.HasComment).ForEach(c => c.Comment.SetVisible());

wb.SaveAs("CommentsPosition.xlsx");

FAQ

Examples

Real world scenarios

Time Savers

Performance and Memory

Misc

Inserting Data/Tables

Styles

Ranges

Rows

Columns

Page Setup (Print Options)

AutoFilters

Comments

Dev docs

Clone this wiki locally