Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Description

...

Wiki Markup
{introducedin 8.5.1}

{description}
	{excerpt}
		The [SaveToStream|ExcelTemplate.SaveToStream()] method creates a new {msdn:System.IO.Stream

...

|System.IO.Stream

...

{signature}

{returns}
	A {msdn:System.IO.Stream
|System.IO.Stream
object.
} object.
{returns}

{example}
	{code:csharp|title=C#}
		//--- 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();
		}
	
{code}
	{code:vb.net
|title=vb.net
}
		'--- 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
	{code}
{example}
Signature
C#C#
} object and writes the processed template to it.
	{excerpt}

	{signature:C#}
		public virtual Stream SaveToStream()
	
Signature
{signature}

	{signature:vb.net
vb.net
}
		Public Overridable Function SaveToStream() As System.IO.Stream
	
Returns
A
Msdn
1System.IO.Stream
Example
Code Block
csharpcsharp
titleC#
Code Block
vb.nettitle