Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Wiki Markup
{introducedin: 8.5.1

...

Description

...

}

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

...

Signature
C#C#

	{excerpt}

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

	{signature:vb.net
vb.net
}
		Public Overridable Function SaveToStream(ByVal workbook As Workbook) As System.IO.Stream
	
Parameters
{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.
Param
workbookworkbook

A Workbook object representing the workbook to save.

Returns
A
Msdn
1System.IO.Stream
Exceptions
} 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}
Exception
System.ExceptionSystem.Exception

If there is a problem reading from the workbook object.

Example
Code Block
csharpcsharp
titleC#
Code Block
vb.nettitle