मैं apache poi का उपयोग कर सेल टिप्पणियां बनाने की कोशिश कर रहा हूं। मैं टिप्पणियां बनाने में सक्षम हूं, लेकिन डिफ़ॉल्ट रूप से वे हमेशा एक्सेल में प्रदर्शित होते हैं। मुझे मैन्युअल रूप से सेल पर क्लिक करना होगा और उन्हें अदृश्य बनाने के लिए टिप्पणियां अन-टिक करें (अब वे तब दिखाई देते हैं जब मैं सेल पर होवर करता हूं)। (। इतना है कि वे सेल पर उपयोगकर्ता मंडराना जब तक एक्सेल में प्रदर्शित नहीं होगी):शोचे टिप्पणियों के साथ apache poi (.xlsx फ़ाइलों के लिए) में सेल टिप्पणियां बनाना
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);
अपाचे पीओआई का कौन सा संस्करण आप उपयोग कर रहे हैं? और यदि यह नवीनतम नहीं है, तो क्या आपने अपग्रेड करने का प्रयास किया? – Gagravarr
हाय गैग्रावायर, मैं अपाचे पीओआई 3.9 का उपयोग कर रहा हूं, जो नवीनतम संस्करण है। –