Control External Resources using WorkbookSetting.StreamProvider

Possible Usage Scenarios

Sometimes, your Excel file contains external resources e.g. linked images, etc. Aspose.Cells allows you to control these external resources using Workbook.Settings.StreamProvider which takes the implementation of IStreamProvider interface. Whenever you will try to render your worksheet containing external resources e.g. linked images, the methods of IStreamProvider interface will be invoked which will enable you to take appropriate actions for your external resources.

Control External Resources using WorkbookSetting.StreamProvider

The following sample code explains the usage of Workbook.Settings.StreamProvider. It loads the sample Excel file containing a linked image. The code replaces the linked image with Aspose Logo and renders the entire sheet into a single image using SheetRender class. The following screenshot shows the sample Excel file and its rendered output image for a reference. As you can see, the broken linked image is replaced with Aspose Logo.

todo:image_alt_text

Sample Code