Quantcast
Viewing all articles
Browse latest Browse all 1621

Created Unassigned: Creating comments on cell [11954]

Hi,

I am trying to create a comment on my sheet, i have copied the sample code but it was giving me an error.

when i tried the code below it works

ISheet sheet = hssfworkbook.CreateSheet("ICell comments in POI HSSF");
IDrawing patr = (HSSFPatriarch)sheet.CreateDrawingPatriarch();

but when I change the implementation like the one below, it gives me an error.

ISheet destinationSheet = destinationWorkbook.GetSheet("Incumbent Data");
__IDrawing patr = (HSSFPatriarch)destinationSheet.CreateDrawingPatriarch();____
IComment comment1 = patr.CreateCellComment(new HSSFClientAnchor(0, 0, 0, 0, 4, 2, 6, 5));

The error occurs on the code that is in bold. The error is "__The given key was not present in the dictionary.__"

I already have a worksheet, so I don't need to create one. Please help me on this. Thanks

Ryan

Viewing all articles
Browse latest Browse all 1621

Trending Articles