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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file office_metadata_extractor-1.0.0.tar.gz.
File metadata
- Download URL: office_metadata_extractor-1.0.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
661285e69deafe236c3258611afcb4f1dc8b2a2e838d97235fe3d7bc99322865
|
|
| MD5 |
1ce4f281890c4d645b000c761bcbc362
|
|
| BLAKE2b-256 |
b12d7868e204b2bee5ad0350a145c87b377d74926c7f4200cbe472390d95ddfd
|
File details
Details for the file office_metadata_extractor-1.0.0-py3-none-any.whl.
File metadata
- Download URL: office_metadata_extractor-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
835619541dc5f0e7782345d439f7f503ebeff0a57e9098f3b2e490c48c97f9a2
|
|
| MD5 |
efd880e81bd4c40c23e3d9fc24862ed3
|
|
| BLAKE2b-256 |
6f9333038a7fcb6a7bbb38b2f64b37013c96ff34d632e4ce739f892b3d3748ec
|