Skip to content

feat: parse custom document properties from docProps/custom.xml - #1

Open
Alex-ley-scrub wants to merge 3 commits into
feat/677-workbook-propertiesfrom
feat/677-custom-properties
Open

feat: parse custom document properties from docProps/custom.xml#1
Alex-ley-scrub wants to merge 3 commits into
feat/677-workbook-propertiesfrom
feat/677-custom-properties

Conversation

@Alex-ley-scrub

Copy link
Copy Markdown
Owner

This is a stacked PR on top of tafia#685.

It adds XLSX custom document property support from docProps/custom.xml, following the earlier discussion in:

Included:

  • parsing of vt:i4, vt:r8, vt:bool, vt:filetime, and vt:lpwstr
  • support for self-closing linked-string forms via linkTarget
  • tests and fixture coverage for supported custom property types
  • example and examples README entry

This branch also includes the lazy workbook-properties loading changes from the lower PR in the stack so it stays current with the latest base branch.

Reuses the existing XLSX property parsers (now pub(crate)) since XLSB
uses the same OPC XML package layout for document properties.
Adds CustomPropertyValue enum supporting the common vt:* types:
- vt:i4 -> Int(i32)
- vt:r8 -> Float(f64)
- vt:bool -> Bool(bool)
- vt:filetime -> DateTime(String) with chrono parse helper
- vt:lpwstr -> String(String) or LinkTarget(String) for linked props

Custom properties are exposed via WorkbookProperties::custom_properties.
Includes an example, README entry, and tests.
# Conflicts:
#	examples/README.md
#	examples/read_properties.rs
#	src/xlsb/mod.rs
#	src/xlsx/mod.rs
#	tests/test.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant