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