Spread WPF Documentation
SaveHtml(String) Method
Example 


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
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.