Last post Aug 17, 2016 10:06 AM by bala1990
Aug 17, 2016 10:06 AM|bala1990|LINK
I have used NPOI for formating Excel . I need to add comments which I was able to do successfully.But the comments did not have a background .
Using HSSFWorkbook , I was able to achive it .
HSSFComment comment = (HSSFComment)patr.CreateCellComment(new HSSFClientAnchor(0, 0, 0, 0, 4, 8, 6, 11));
comment.SetFillColor(204, 236, 255);
But I suppose HSSFWorkbook is for XLS format. When I try to export XLSX format I get format error when I try open the exported file.
My Requirement is to Export XLSX file with Comments in it . So I changed the code to XSSFWorkbook for formating . It works fine except I was not able to Set Background color for Comment bubble . The SetFillColor function is not presesnt
in XSSFWorkbook . But its present in HSSFWorkbook. I did see XSSFShape which has SetFillcolor function in it . I am not sure how to use this.
The below link have mentioned that SetFillColor is present in XSSFWorkbook . But its not
Can someone let me know how to set background of Comment using XSSFWorkbook. ?