Save Html With StreamProvider
When converting excel fiels which contain images and shapes to html files, we offen face the following two issues:
- Where should we save the images and shapes when saving excel file to html stream.
- Replace the default path with excepted path.
This article explains how to implement IStreamProvider interface for setting the HtmlSaveOptions.StreamProvider property. By implementing this interface, you will be able to save the created resources during HTML generation to your specific locations or memory streams.
This is the main code showing the usage of HtmlSaveOptions.StreamProvider property
Here is the code for ExportStreamProvider class which implements IStreamProvider interface used inside the above code.