Package com.aspose.cells

Examples of com.aspose.cells.Comment


    //Adding a new worksheet to the Workbook object
    Worksheet worksheet = workbook.getWorksheets().get(0);

    //Adding a comment to cell
    int commentIndex = worksheet.getComments().add("A1");
    Comment comment = worksheet.getComments().get(commentIndex);

    //Setting the comment note
    comment.setNote("Hello Aspose!");
   
    //Setting the font size of a comment to 14
    Font font = comment.getFont();
    font.setSize(14);
    //Setting the font of a comment to bold
    font.setBold(true);

    //Setting the height of the font to 10
    comment.setHeightCM(10);

    //Setting the width of the font to 2
    comment.setWidthCM(2);

    //Saving the Excel file
    workbook.save("data/xlsx4j/AddComments-Aspose.xlsx", SaveFormat.XLSX);
   
    //Print Message
View Full Code Here

TOP

Related Classes of com.aspose.cells.Comment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.