Skip to main content

Extract custom/core metadata from Office (.docx, .xlsx, .pptx) files

Project description

Office Metadata Extractor

A Python library for extracting custom.xml and core.xml metadata from Microsoft Office files (.docx, .xlsx, .pptx). It also includes file-level metadata like file size and timestamps.

Installation

pip install office_metadata_extractor

Usage

from office_metadata_extractor import OfficeMetadataExtractor

Option 1: Use a folder path

extractor = OfficeMetadataExtractor('path/to/folder')
metadata = extractor.get_metadata()

Option 2: Use a list of files

files = ['doc1.docx', 'sheet1.xlsx']
extractor = OfficeMetadataExtractor(files)
metadata = extractor.get_metadata()

Save to JSON

import json
with open('output.json', 'w') as f:
    json.dump(metadata, f, indent=4)

Output

{
  "file.docx": {
    "custom": {
      "Property1": "Value1"
    },
    "core": {
      "title": "Document Title",
      "creator": "John"
    },
    "file_info": {
      "file_size": 10240,
      "modified_time": "2025-05-15T14:45:21",
      "created_time": "2025-05-10T10:12:03"
    }
  }
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

office_metadata_extractor-1.0.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

office_metadata_extractor-1.0.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file office_metadata_extractor-1.0.0.tar.gz.

File metadata

File hashes

Hashes for office_metadata_extractor-1.0.0.tar.gz
Algorithm Hash digest
SHA256 661285e69deafe236c3258611afcb4f1dc8b2a2e838d97235fe3d7bc99322865
MD5 1ce4f281890c4d645b000c761bcbc362
BLAKE2b-256 b12d7868e204b2bee5ad0350a145c87b377d74926c7f4200cbe472390d95ddfd

See more details on using hashes here.

File details

Details for the file office_metadata_extractor-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for office_metadata_extractor-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 835619541dc5f0e7782345d439f7f503ebeff0a57e9098f3b2e490c48c97f9a2
MD5 efd880e81bd4c40c23e3d9fc24862ed3
BLAKE2b-256 6f9333038a7fcb6a7bbb38b2f64b37013c96ff34d632e4ce739f892b3d3748ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page