Class HtmlTableLoadOption
Contents
[
Hide
]HtmlTableLoadOption class
Represents the option when import table from html.
public class HtmlTableLoadOption
Constructors
Name | Description |
---|---|
HtmlTableLoadOption() | The default constructor. |
Properties
Name | Description |
---|---|
Id { get; set; } | Get or set the id of table to import from html |
Name { get; set; } | (Obsolete.) Get or set the name of table to import from html |
OriginalSheetIndex { get; set; } | Get or set the original index of worksheet in the html. |
TableIndex { get; set; } | Get or set the index of table to import from html. |
TableToListObject { get; set; } | Indicates whether generate list objects from imported table. The default value is false. |
TargetSheetIndex { get; set; } | Get or set the target index of worksheet where the table is to be located. |
Examples
[C#]
namespace Demos
{
using Aspose.Cells;
using System;
public class HtmlTableLoadOptionDemo
{
public static void HtmlTableLoadOptionExample()
{
// Create a new Workbook
Workbook workbook = new Workbook();
// Create an instance of HtmlLoadOptions
HtmlLoadOptions loadOptions = new HtmlLoadOptions();
// Create an instance of HtmlTableLoadOption
HtmlTableLoadOption tableLoadOption = new HtmlTableLoadOption
{
TableIndex = 0,
Id = "table1",
Name = "SampleTable",
OriginalSheetIndex = 0,
TargetSheetIndex = 0,
TableToListObject = true
};
// Add the HtmlTableLoadOption to the HtmlLoadOptions
loadOptions.TableLoadOptions.Add(tableLoadOption);
// Load the HTML file into the workbook with the specified load options
workbook = new Workbook("HtmlTableLoadOptionExample_original.html", loadOptions);
// Save the workbook to an Excel file
workbook.Save("HtmlTableLoadOptionExample.xlsx");
return;
}
}
}
See Also
- namespace Aspose.Cells
- assembly Aspose.Cells