Saves workbook in HTML file. Returns 1 if it succeeds
[Visual Basic] Function SaveAsHTML( _ ByVal Filename As String _ ) As Integer [C#] int SaveAsHTML( string Filename ); [C++] int SaveAsHTML( String* Filename ); [JScript] function SaveAsHTML( String Filename ): int;
This example creates a new workbook and then saves it in the HTML file.
[C#]
//Create a new empty workbook.
IWorkbook book = NativeExcel.Factory.CreateWorkbook();
//Create a new sheet in the workbook.
IWorksheet sheet = book.Worksheets.Add();
//cell B2
IRange cell = sheet.Cells[2,2];
cell.Value = "Text value";
cell.Font.Size = 20;
cell.Font.ColorIndex = 3;
cell.ColumnWidth = 50;
//Save workbook
book.SaveAsHTML("book.html");
[Visual Basic]
'Create a new empty workbook.
Dim book As IWorkbook = NativeExcel.Factory.CreateWorkbook()
'Create a new sheet in the workbook.
Dim sheet As IWorksheet = book.Worksheets.Add()
'cell B2
Dim cell As IRange = sheet.Cells(2,2)
cell.Value = "Text value"
cell.Font.Size = 20
cell.Font.ColorIndex = 3
cell.ColumnWidth = 50
'Save workbook
book.SaveAsHTML("book.html")
[C++]
IWorkbook* book = NativeExcel::Factory::CreateWorkbook();
//Create a new sheet in the workbook.
IWorksheet* sheet = book->Worksheets->Add();
//cell B2
IRange* cell = sheet->Cells->Item[2,2];
cell->Value = S"Text value";
cell->Font->Size = 20;
cell->Font->ColorIndex = 3;
cell->ColumnWidth = 50;
//Save workbook
book->SaveAsHTML(S"book.html");
IWorkbook Interface | NativeExcel Namespace