Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Introducedin
8.5.1

...

8.5.1
Description

Excerpt

Creates a new System.IO.Stream

...

object

...

and

...

writes

...

the

...

processed

...

template

...

to

...

it.

...

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

	{signature:
}
Signature
vb.net
vb.net
		Public Overridable Function SaveToStream() As System.IO.Stream
	{signature}

{returns}
	A {msdn:
Returns

A

Msdn
System.IO.Stream

|

System.IO.Stream

} object. {returns} {example} {code:csharp|title=C#}

1System.IO.Stream
object.

Example
Code Block
csharp
csharp
titleC#

		//--- 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:
Code Block
vb.net
|title=
vb.net
titlevb.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}