c# - Gembox: Modify Comment Size -
i'm using gembox 37.3.30.1030. i'm adding comments cells not displayed due small comment size. don't see properties can resize comment. can help? thanks!
you can define excelcomment
's size specifying topleftcell
, bottomrightcell
.
example:
excelfile workbook = new excelfile(); excelworksheet worksheet = workbook.worksheets.add("sheet1"); excelcomment comment = worksheet.cells["b2"].comment; comment.text = "lorem ipsum dolor sit amet, consectetur adipiscing elit."; comment.topleftcell = new anchorcell(worksheet.columns[3], worksheet.rows[5], true); comment.bottomrightcell = new anchorcell(worksheet.columns[6], worksheet.rows[20], false); //comment.isvisible = true; workbook.save("sample.xlsx");
note there no auto-fitting or auto-sizing or similar comments content, you'll have set size yourself.
try creating rough approximation adjust comment's size based on number of lines or number of characters in comment's text.
fyi last version of gembox.spreadsheet 3.7 37.3.30.1189, can download here.
wiki
Comments
Post a Comment