Spread WPF Documentation
SaveHtml(Stream) Method
Example 


The HTML stream.
Saves the data on the sheet to the specified stream.
Syntax
'Declaration
 
Public Overloads Sub SaveHtml( _
   ByVal stream As System.IO.Stream _
) 
'Usage
 
Dim instance As Worksheet
Dim stream As System.IO.Stream
 
instance.SaveHtml(stream)
public void SaveHtml( 
   System.IO.Stream stream
)

Parameters

stream
The HTML stream.
Example
This example uses the SaveHtml method.
gcSpreadSheet1.Sheets[0].ShowGridLine = true;
gcSpreadSheet1.Sheets[0].GridLineColor = Color.FromRgb(150, 25, 199);
gcSpreadSheet1.Sheets[0].Cells[0, 0].Text = "test";

gcSpreadSheet1.Sheets[0].SaveHtml("c:\\zipfile\\test.html");
// or 
// string fileName;
// fileName = "..\\..\\bin\\savespreadstream.csv";
// System.IO.Stream stream;
// stream = System.IO.File.Create(fileName);
// gcSpreadSheet1.Sheets[0].SaveHtml(stream);
GcSpreadSheet1.Sheets(0).ShowGridLine = True
GcSpreadSheet1.Sheets(0).GridLineColor = Color.FromRgb(150, 25, 199)
GcSpreadSheet1.Sheets(0).Cells(0, 0).Text = "test"
GcSpreadSheet1.Invalidate()

Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
GcSpreadSheet1.Sheets(0).SaveHtml("c:\zipfile\test.html")
'or use a stream
'Dim fileName As String
' fileName = "c:\zipfile\savespreadstream.html"
'Dim stream As System.IO.Stream
'stream = System.IO.File.Create(fileName, System.IO.FileMode.Create)
'GcSpreadSheet1.Sheets(0).SaveHtml(stream)
'GcSpreadSheet1.Invalidate()
End Sub
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional (SP4), Windows XP (SP2), Windows 2008, Windows 2003 Server (SP1)

See Also

Reference

Worksheet Class
Worksheet Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.