Spread WPF Documentation
SaveHtml(Stream) Method
Example 


GrapeCity.Windows.SpreadSheet.Data Namespace > Worksheet Class > SaveHtml Method : SaveHtml(Stream) Method
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
See Also

Reference

Worksheet Class
Worksheet Members
Overload List