How to Export Metadata from Excel Files
In this tutorial:
- Accessing built-in file properties
- Extracting custom properties
- Using VBA for metadata export
- PowerShell methods
- Third-party tools and alternatives
You'll need:
- Excel (2010 or newer)
- Administrator access (for some methods)
- Basic VBA knowledge (optional)
How to Export Excel File Metadata
Method 1: Using Built-in Properties
Accessing File Properties
-
1
Open File Properties
- • Right-click Excel file → Properties
- • Or File → Info → Properties → Advanced Properties
-
2
Available Metadata Categories:
- • General: Size, Type, Location
- • Summary: Title, Subject, Author, Keywords
- • Statistics: Created, Modified, Accessed dates
- • Custom: User-defined properties
Export workbook properties with VBA
The code below reads built-in and custom document properties of the workbook containing the macro and writes available values to a new sheet. It does not export Windows file-system dates or hidden worksheet content. Save a copy as .xlsm before running it; macros are unavailable in Excel for the web.
Sub ExportWorkbookProperties()
Dim p As Object, ws As Worksheet, r As Long, v As Variant
Set ws = ThisWorkbook.Worksheets.Add
ws.Range("A1:B1").Value = Array("Property", "Value")
r = 2
For Each p In ThisWorkbook.BuiltinDocumentProperties
Err.Clear
On Error Resume Next
v = p.Value
If Err.Number = 0 Then
ws.Cells(r, 1).Value = p.Name
ws.Cells(r, 2).Value = v
r = r + 1
End If
On Error GoTo 0
Next p
For Each p In ThisWorkbook.CustomDocumentProperties
ws.Cells(r, 1).Value = p.Name
ws.Cells(r, 2).Value = p.Value
r = r + 1
Next p
ws.Columns("A:B").AutoFit
End Sub
Some built-in properties are undefined and raise an error when their value is read; the macro skips those entries. Review the output for personal information before sharing the workbook.
File properties on Windows
In File Explorer, right-click the file and open Properties > Details to inspect exposed fields. Explorer's displayed fields vary by file type and Windows version; copying the file list is not a complete export of workbook custom properties. For repeatable batch work, inventory exact fields and test a script on copies before processing a folder.
Integration with Other Tools
SharePoint Integration
- Use SharePoint columns for metadata
- Sync metadata with SharePoint properties
- Use Power Automate for automation
Power BI Connection
- Create metadata dashboards
- Track file usage patterns
- Monitor metadata changes
Security Considerations
-
Privacy Concerns:
- • Remove personal information before sharing
- • Check for hidden metadata
- • Use Document Inspector before distribution
-
Compliance:
- • Follow data protection regulations
- • Document metadata handling procedures
- • Maintain audit trails of changes
Regular Maintenance Checklist
-
Weekly Tasks:
- • Update modified dates
- • Check for missing properties
- • Verify metadata accuracy
-
Monthly Tasks:
- • Full metadata backup
- • Clean up obsolete properties
- • Update automation scripts