Spread WPF Documentation
SaveHtml(String) Method
Example 


GrapeCity.Windows.SpreadSheet.Data Namespace > Worksheet Class > SaveHtml Method : SaveHtml(String) Method
The path and name of the HTML file.
Saves the data on the sheet to the HTML file.
Syntax
'Declaration
 
Public Overloads Sub SaveHtml( _
   ByVal fileName As System.String _
) 
'Usage
 
Dim instance As Worksheet
Dim fileName As System.String
 
instance.SaveHtml(fileName)
public void SaveHtml( 
   System.string fileName
)

Parameters

fileName
The path and name of the HTML file.
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