modern-xlsx API Reference - v1.3.0
    Preparing search index...

    Function generateDrawingXml

    • Builds the drawing part (xl/drawings/drawingN.xml) that places images on a worksheet, one xdr:twoCellAnchor per entry. Each picture is named Barcode 1, Barcode 2, ... in order.

      Parameters

      • anchors: { anchor: ImageAnchor; imageIndex: number }[]

        Images to place. anchor is the cell range; imageIndex selects the relationship the picture embeds, rId<imageIndex>, so it must match an rId passed to generateDrawingRels.

      Returns string

      The drawing XML as a string.

      If an anchor column is not an integer 0-16383, a row is not an integer 0-1048575, an offset is not a non-negative safe integer, or an anchor ends before it starts.