Insert a Picture Based on Cell Reference
Contents
[
Hide
]
Sometimes you have an empty picture and need to show data or contents in the picture by setting a cell reference in the Formula Bar. Aspose.Cells supports this feature (Microsoft Excel 2010).
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 that you make to the data in that cell or cell range 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 Formula attribute of the Picture object.
Code Example