NPOI 2.1.3.1
Excel 2013
When using NPOI 2.1.3.1 to create a workbook containing cell comments, then opening the workbook in Excel 2013 and saving, results in the cell comments being reformated as an arrow shape (see attached file, cell-comment.png).
Possibly related to [work item 12320 (Excel 2013, XSSF CellComment, Shape problem)](http://npoi.codeplex.com/workitem/12320).
Steps to reproduce:
1. Create an Excel workbook using the code below.
2. Open the file in Excel 2013 - observe the cell comment is correctly formatted
3. Save the file
4. Close the file
5. Reopen file in Excel 2013 - observe the cell comment has been reformated as an arrow
```
var workbook = new XSSFWorkbook();
var worksheet = workbook.CreateSheet("Sheet1");
var row = worksheet.CreateRow(0);
var cell = row.CreateCell(0);
var anchor = (workbook).GetCreationHelper().CreateClientAnchor();
anchor.AnchorType = (int)AnchorType.DontMoveAndResize;
anchor.Col1 = cell.ColumnIndex;
anchor.Col2 = cell.ColumnIndex + 3;
anchor.Row1 = cell.RowIndex;
anchor.Row2 = cell.RowIndex + 3;
var comment = worksheet.CreateDrawingPatriarch().CreateCellComment(anchor);
comment.String = (workbook).GetCreationHelper().CreateRichTextString("Comment text");
cell.CellComment = comment;
using (var stream = new FileStream(@"C:\comment.xlsx", FileMode.Create))
{
workbook.Write(stream);
}
```
Excel 2013
When using NPOI 2.1.3.1 to create a workbook containing cell comments, then opening the workbook in Excel 2013 and saving, results in the cell comments being reformated as an arrow shape (see attached file, cell-comment.png).
Possibly related to [work item 12320 (Excel 2013, XSSF CellComment, Shape problem)](http://npoi.codeplex.com/workitem/12320).
Steps to reproduce:
1. Create an Excel workbook using the code below.
2. Open the file in Excel 2013 - observe the cell comment is correctly formatted
3. Save the file
4. Close the file
5. Reopen file in Excel 2013 - observe the cell comment has been reformated as an arrow
```
var workbook = new XSSFWorkbook();
var worksheet = workbook.CreateSheet("Sheet1");
var row = worksheet.CreateRow(0);
var cell = row.CreateCell(0);
var anchor = (workbook).GetCreationHelper().CreateClientAnchor();
anchor.AnchorType = (int)AnchorType.DontMoveAndResize;
anchor.Col1 = cell.ColumnIndex;
anchor.Col2 = cell.ColumnIndex + 3;
anchor.Row1 = cell.RowIndex;
anchor.Row2 = cell.RowIndex + 3;
var comment = worksheet.CreateDrawingPatriarch().CreateCellComment(anchor);
comment.String = (workbook).GetCreationHelper().CreateRichTextString("Comment text");
cell.CellComment = comment;
using (var stream = new FileStream(@"C:\comment.xlsx", FileMode.Create))
{
workbook.Write(stream);
}
```