// Explicitly specifying the format of a file to load you can spare some time on detecting the formatLoadOptionsloadOptions=newLoadOptions(FileFormat.Spreadsheet);// Constants.InputXls is an absolute or relative path to your document. Ex: @"C:\Docs\source.xls"try(Metadatametadata=newMetadata(Constants.InputXls,loadOptions)){SpreadsheetRootPackageroot=metadata.getRootPackageGeneric();// Use format-specific properties to extract or edit metadataSystem.out.println(root.getDocumentProperties().getAuthor());// ...}
More resources
GitHub examples
You may easily run the code above and see the feature in action in our GitHub examples: