Class HtmlTableLoadOptionCollection
Contents
[
Hide
]HtmlTableLoadOptionCollection class
Represents the table options when importing html.
public class HtmlTableLoadOptionCollection : CollectionBase<HtmlTableLoadOption>
Constructors
Name | Description |
---|---|
HtmlTableLoadOptionCollection() | The default constructor. |
Properties
Name | Description |
---|---|
Capacity { get; set; } | |
Count { get; } | |
Item { get; } | Gets the HtmlTableLoadOption element at the specified index. |
Item { get; set; } | |
TableToListObject { get; set; } | Indicates whether generate list objects from imported tables. The default value is false. |
Methods
Name | Description |
---|---|
Add(HtmlTableLoadOption) | Adds one HtmlTableLoadOption into this collection. |
Add(int) | Add a HtmlTableLoadOption to the list. |
Add(string) | Add a HtmlTableLoadOption to the list. |
Add(int, int) | Add a HtmlTableLoadOption to the list. |
Add(string, int) | Add a HtmlTableLoadOption to the list. |
Add(int, int, int) | Add a HtmlTableLoadOption to the list. |
Add(string, int, int) | Add a HtmlTableLoadOption to the list. |
BinarySearch(HtmlTableLoadOption) | |
BinarySearch(HtmlTableLoadOption, IComparer<HtmlTableLoadOption>) | |
BinarySearch(int, int, HtmlTableLoadOption, IComparer<HtmlTableLoadOption>) | |
Clear() | |
Contains(HtmlTableLoadOption) | |
CopyTo(HtmlTableLoadOption[]) | |
CopyTo(HtmlTableLoadOption[], int) | |
CopyTo(int, HtmlTableLoadOption[], int, int) | |
Exists(Predicate<HtmlTableLoadOption>) | |
Find(Predicate<HtmlTableLoadOption>) | |
FindAll(Predicate<HtmlTableLoadOption>) | |
FindIndex(Predicate<HtmlTableLoadOption>) | |
FindIndex(int, Predicate<HtmlTableLoadOption>) | |
FindIndex(int, int, Predicate<HtmlTableLoadOption>) | |
FindLast(Predicate<HtmlTableLoadOption>) | |
FindLastIndex(Predicate<HtmlTableLoadOption>) | |
FindLastIndex(int, Predicate<HtmlTableLoadOption>) | |
FindLastIndex(int, int, Predicate<HtmlTableLoadOption>) | |
GetEnumerator() | |
IndexOf(HtmlTableLoadOption) | |
IndexOf(HtmlTableLoadOption, int) | |
IndexOf(HtmlTableLoadOption, int, int) | |
LastIndexOf(HtmlTableLoadOption) | |
LastIndexOf(HtmlTableLoadOption, int) | |
LastIndexOf(HtmlTableLoadOption, int, int) | |
RemoveAt(int) |
Examples
[C#]
namespace Demos
{
using Aspose.Cells;
using System;
public class HtmlTableLoadOptionCollectionDemo
{
public static void HtmlTableLoadOptionCollectionExample()
{
// Create a new Workbook
Workbook workbook = new Workbook();
// Create HtmlLoadOptions
HtmlLoadOptions loadOptions = new HtmlLoadOptions();
// Access the HtmlTableLoadOptionCollection instance
HtmlTableLoadOptionCollection tableLoadOptions = loadOptions.TableLoadOptions;
// Set the TableToListObject property
tableLoadOptions.TableToListObject = true;
// Add a new HtmlTableLoadOption by table index
int index1 = tableLoadOptions.Add(0);
// Add a new HtmlTableLoadOption by table id
int index2 = tableLoadOptions.Add("tableId");
// Add a new HtmlTableLoadOption by table index and target sheet index
int index3 = tableLoadOptions.Add(1, 1);
// Add a new HtmlTableLoadOption by table id and target sheet index
int index4 = tableLoadOptions.Add("tableId2", 2);
// Add a new HtmlTableLoadOption by table index, target sheet index, and original sheet index
int index5 = tableLoadOptions.Add(2, 2, 0);
// Add a new HtmlTableLoadOption by table id, target sheet index, and original sheet index
int index6 = tableLoadOptions.Add("tableId3", 3, 1);
// Access the HtmlTableLoadOption at a specific index
HtmlTableLoadOption option = tableLoadOptions[index1];
// Set properties of the HtmlTableLoadOption
option.TableIndex = 0;
option.Id = "tableId";
option.Name = "TableName";
option.OriginalSheetIndex = 0;
option.TargetSheetIndex = 1;
option.TableToListObject = true;
// Load an HTML file into the workbook using the load options
workbook = new Workbook("HtmlTableLoadOptionCollectionExample_original.html", loadOptions);
// Save the workbook
workbook.Save("HtmlTableLoadOptionCollectionExample.xlsx");
return;
}
}
}
See Also
- class CollectionBase<T>
- class HtmlTableLoadOption
- namespace Aspose.Cells
- assembly Aspose.Cells