ShapeCollection.AddSvg

ShapeCollection.AddSvg method

Adds svg image.

public Picture AddSvg(int upperLeftRow, int top, int upperLeftColumn, int left, int height, 
    int width, byte[] svgData, byte[] compatibleImageData)
ParameterTypeDescription
upperLeftRowInt32Upper left row index.
topInt32Represents the vertical offset of shape from its left row, in unit of pixel.
upperLeftColumnInt32Upper left column index.
leftInt32The horizontal offset of shape from its left column, in unit of pixel.
heightInt32The height of shape, in unit of pixel.
widthInt32The width of shape, in unit of pixel.
svgDataByte[]The svg image data.
compatibleImageDataByte[]Converted image data from svg in order to be compatible with Excel 2016 or lower versions.

Examples


[C#]
// add a svg
using (FileStream fs = new FileStream("image.svg", FileMode.Open))
{
    int len = (int)fs.Length;
    byte[] imageData = new byte[len];
    fs.Read(imageData, 0, len);
    Picture picture = shapes.AddSvg(4, 0, 5, 0, -1, -1, imageData, null);
}

See Also