Creating cell comments in apache poi (for .xlsx files) with show comments disabled -


i trying create cells comments using apache poi. able create comments, default displayed in excel. have manual right click on cell , un-tick show comments make them invisible(now appear when hover on cell). possible make cell comments invisible default(so don't appear in excel until user hover on cell.)

here code used :

    drawing drawing = cell.getsheet().createdrawingpatriarch();     creationhelper factory = cell.getsheet().getworkbook().getcreationhelper();     clientanchor anchor = factory.createclientanchor();     anchor.setcol1(cell.getcolumnindex());     anchor.setcol2(cell.getcolumnindex() + 1);     anchor.setrow1(cell.getrowindex());     anchor.setrow2(cell.getrowindex() + 3);      comment comment = drawing.createcellcomment(anchor);     richtextstring str = factory.createrichtextstring(message);     comment.setvisible(boolean.false);     comment.setstring(str);      cell.setcellcomment(comment); 

paroksh. have executed same code have given. default, getting comments on hover only. seems not code issue excel settings issue. have checked in excel 2010. if have different version check similar settings.

please check home --> option --> advanced --> display...

there "indicators only, , comments on hover" radio button should selected.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -