Refresh Values of Linked Shapes
Contents
[
Hide
]
Sometimes, you have a linked shape in your Excel file which is linked to some cell. In Microsoft Excel, changing the value of the linked cell also changes the value of the linked shape. This also works fine with Aspose.Cells for Python via .NET if you want to save your workbook in XLS or XLSX format. However, if you want to save your workbook in PDF or HTML format, then you will have to call Worksheet.Shapes.update_selected_value() method to refresh the value of the linked shape.
Example
The following screenshot shows the source Excel file used in the sample code below. It has a linked picture linked to cells A1 to E4. We will change the value of cell B4 with Aspose.Cells for Python via .NET and then call Worksheet.Shapes.update_selected_value() method to refresh the value of the picture and save it in PDF format.
You can download the source Excel file and the output PDF from the given links.