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
Wiki Markup
{introducedin: 8.5.1}

{description}
	{excerpt}
		Saves a specified Workbook object to a System.IO.Stream object and returns it.
	{excerpt}

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

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

{parameters}
	{param:workbook}
		A {{Workbook}} object representing the workbook to save.
	{param}

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

{exceptions}
	{exception:System.Exception}
		If there is a problem reading from the workbook object.
	{exception}

{example}
	{code:csharp|title=C#}
		//--- Creates a new Workbook object and saves it to a stream
		ExcelApplication xla = new ExcelApplication();
		Workbook wb = xla.Create();
		Stream stream = xla.SaveToStream(wb);
	{code}
	
	{code:vb.net|title=vb.net}
		'--- Creates a new workbook object and saves it to a stream
		Dim xla As New ExcelApplication()
		Dim wb As Workbook = xla.Create()
		Dim stream As System.IO.Stream() = xla.SaveToStream(wb)
	{code}
{example}