Creates a new System.IO.Stream object and writes the processed template to it.
public virtual Stream SaveToStream()
Public Overridable Function SaveToStream() As System.IO.Stream
A object.
//--- Reads a .xlsx file from disk and saves it to a stream
using (ExcelTemplate xlt = new ExcelTemplate())
{
xlt.Open(@"C:\temp\example.xlsx");
xlt.Process();
Stream stream = xlt.SaveToStream();
}
'--- Reads a .xlsx file from disk and saves it to a stream
Using xlt As New ExcelTemplate()
xlt.Open("c:\temp\example.xlsx")
xlt.Process()
Dim stream As System.IO.Stream() = xlt.SaveToStream();
End Using