OpenXmlSdkTs - v1.0.7
    Preparing search index...

    Class OpenXmlRelationship

    Represents a single relationship within an Open XML package.

    Relationships link parts to other parts or external resources. Each relationship has a unique ID, a type URI, and a target URI. Package-level relationships are stored in /_rels/.rels; part-level relationships are stored alongside each part.

    Use OpenXmlPackage.getRelationships or OpenXmlPart.getRelationships to retrieve relationships, and RelationshipType constants for type comparisons.

    const rels = await mainPart.getRelationships();
    for (const rel of rels) {
    console.log(`${rel.getId()} [${rel.getType()}] -> ${rel.getTargetFullName()}`);
    }
    Index

    Methods

    • Returns "External" for external targets, or null for internal targets.

      Returns string | null

    • Returns the fully resolved target URI.

      Returns string

      For internal targets, resolves the relative path against the source part's directory. For external targets and absolute paths, returns the target as-is.