Clear Comments from Excel Document Online or Manage via Android Apps
Develop powerful Android based Excel document annotation utility application. Code listed for managing comments of Excel file.
Remove Excel Annotations Online
- Import Excel file to delete comments by uploading it
- Do it by clicking inside the drop area via drag and drop of annotation app
- Depending on the size of Excel file and internet speed wait for few seconds
- Click the ‘Remove’ button to clear comments
- Download the file instantly
Remove Excel Document Comments via Android App API
- Add library reference to Android project
- Load Document via Workbook class object
- Select the specific Worksheet
- Get all comments from the using getComments()
- Get all Threaded comments via getThreadedComments
- Use removeAt to remove comments and authors respectively
- Call the save method to save the file
Code : Remove Comments from Excel Document
Workbook workbook = new Workbook(dataDir + "ExcelDocumentwithComments.xlsx"); | |
Worksheet worksheet = workbook.getWorksheets().get(0); | |
CommentCollection comments = worksheet.getComments(); | |
ThreadedCommentCollection threadedComments = worksheet.getComments().getThreadedComments("I4"); | |
ThreadedCommentAuthor author = threadedComments.get(0).getAuthor(); | |
comments.removeAt("I4"); | |
ThreadedCommentAuthorCollection authors = workbook.getWorksheets().getThreadedCommentAuthors(); | |
authors.removeAt(authors.indexOf(author)); | |
workbook.save(dataDir + "removedcomments.xlsx"); |
Update Threaded Excel Comments
- Load Document via Workbook class object
- Get the sepecific Worksheet
- Get the threaded comment using getComments().getThreadedComments(Index).get(Index)
- Use setNotes method to update the comment
- Call the save method to save the file
Add Comments via Android App API
- Create Document via Workbook class object
- Get the sepecific Worksheet
- Add comment index via getComments().add
- Use the setNotes method to add comment
- Call the save method to save the file with added comments
Code : Update Threaded Comment of Excel File
Workbook workbook = new Workbook(dataDir + "ThreadedCommentsFile.xlsx"); | |
Worksheet worksheet = workbook.getWorksheets().get(0); | |
ThreadedComment comment = worksheet.getComments().getThreadedComments("A1").get(0); | |
comment.setNotes("Updated Comment"); | |
workbook.save(dataDir + "updateThreadedComments.xlsx"); |
Code: Adding Comments
Workbook workbook = new Workbook(); | |
int sheetIndex = workbook.getWorksheets().add(); | |
Worksheet worksheet = workbook.getWorksheets().get(sheetIndex); | |
int commentIndex = worksheet.getComments().add("F5"); | |
com.aspose.cells.Comment comment = worksheet.getComments().get(commentIndex); | |
comment.setNote( "Hello Aspose!"); | |
workbook.save(dataDir + "book1.out.xls"); |
Develop Excel Document Annotation Android App
Need to develop an android based Excel annotation app or utility to provide feedback, make suggestions, or collaborate with others on the document? With
Aspose.Cells for Android via Java
a child API of
Aspose.Total for Android via Java
, any android developer can integrate the above API code within its document annotation application. Powerful android library allows programming any document annotation solution. Moreover it can support many popular formats including Excel format.
Android API to Annotate Excel Files
- We host our Java packages in Maven repositories .
- Aspose.Cells for Java is a common JAR file containing byte-code.
- Follow the step-by-step instructions on how to install Aspose.Cells for Android via Java.
System Requirements
- Android OS 2.0 or above.
- Java package is cross-platform and runs on all operating systems with JVM implementation.
For more details please refer to [Product Documentation](https://docs.aspose.com/cells/java/system-requirements/).