Insert a Picture based on Cell Reference

Inserting a Picture Based on Cell Reference

Aspose.Cells supports displaying the contents of a worksheet cell in an image shape. You can link the picture to the cell that contains the data that you want to display. Since the cell or cell range is linked to the graphic object, changes to the data automatically appear in the graphic object. Add a picture to the worksheet by calling the addPicture method of the ShapeCollection collection (encapsulated in the Worksheet object). Specify the cell range by using the setFormula method of the Picture object.

Below is a screenshot of the file the code below generates.

Inserting a picture based on cell reference


Sample Code