Maximum length for cell Comments

Hello.
I use Aspose.Excel to export data.
Sometimes the comments for cells can be rather long.
So once a comment for one cell excceeds some limit the whole worksheet dissapeares when i open the saved file using Excel.

The code i use to create comments:
-----------
Worksheet sheet = excel.Worksheets[0];
int comInx = sheet.Comments.Add(1, 1);
Comment commentObj = sheet.Comments[comInx];
commentObj.Note = hugeString;
-----------

So the question is what’s the maximum limit of cell comments.

The maximum length of cell comments in Aspose.Excel is 4111. We will extend it in the future release.

Ok. Thanks)
I’ve checked it and it’s correct.
But why such a nice number?)

That limited by a single record in Excel file.

I will extend it to 8222 for ASCII string and 4111 for Unicode string in the first step.

Could you tell me how long your comments are?

@DIX,
Aspose.Cells is the latest product which has replaced Aspose.Excel that is discarded and no more development is done for it. Using Aspose.Cells you can not only work with the older Notes but also manage the threaded comments. The following example demonstrates the feature to add Notes (known as comments).

Add Comments

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// Instantiating a Workbook object
Workbook workbook = new Workbook();

// Adding a new worksheet to the Workbook object
int sheetIndex = workbook.Worksheets.Add();

// Obtaining the reference of the newly added worksheet by passing its sheet index
Worksheet worksheet = workbook.Worksheets[sheetIndex];

// Adding a comment to "F5" cell
int commentIndex = worksheet.Comments.Add("F5");

// Accessing the newly added comment
Comment comment = worksheet.Comments[commentIndex];

// Setting the comment note
comment.Note = "Hello Aspose!";

// Saving the Excel file
workbook.Save(dataDir + "book1.out.xls");

For threaded comments, have a look at the following sample code:

Add Threaded comments

Workbook workbook = new Workbook();

// Add Author
int authorIndex = workbook.Worksheets.ThreadedCommentAuthors.Add("Aspose Test", "", "");
ThreadedCommentAuthor author = workbook.Worksheets.ThreadedCommentAuthors[authorIndex];

// Add Threaded Comment
workbook.Worksheets[0].Comments.AddThreadedComment("A1", "Test Threaded Comment", author);

workbook.Save(outDir + "AddThreadedComments_out.xlsx");

Following are the relevant document sections that can be referred to for these features:
Managing Comments (Notes)
Threaded Comments

The latest free trial version is available here:
Aspose.Cells for .NET (Latest Version)

For testing different features of this product, a comprehensive runnable solution is available here.