Display Document Properties in Excel using Java

This quick guide explains how to display document properties in Excel using Java. It has the resources to set the IDE for development, a list of steps required for this feature, and a sample code to print properties of Excel spreadsheet using Java. You will get information about various document properties and accessing them in different ways according to the requirements.

Steps to Display Excel File Properties using Java

  1. Set the IDE by using Aspose.Cells for Java to print the Excel file properties
  2. Load the Excel file into the Workbook and iterate through the custom properties collection
  3. Change the Object type to the DocumentProperty and display the name and value
  4. Iterate through all the built-in properties and display the names and values
  5. Access individual properties using the name or index and display various parameters

These steps assist in accessing and displaying the Excel spreadsheet properties using Java. Load the Excel spreadsheet and access the collection of CustomDocumentProperties and BuiltInDocumentProperties in it. In each iteration, convert the Object type to DocumentProperty and display the names, values, and other available information.

Code to Print Excel Workbook Properties using Java

This code demonstrates how to display document properties in Excel using Java. The DocumentProperty contains the Name and Value that are displayed, however, you may use other methods and properties in it say source, hash code, isLinkedToContent, toDateTime, etc. An Excel file has various properties that can be accessed and displayed like Title, Subject, Author, Comments, LastSavedBy, and CreateTime.

This article has taught us how to access the Excel file properties and display them. If you want to apply filters in an Excel file, refer to the article on how to apply filter in Excel using Java.

 English