Class CellsDataTableFactory

Class CellsDataTableFactory

Namespace: Aspose.Cells
Assembly: Aspose.Cells.dll (25.2.0)

Utility to build ICellsDataTable from custom objects for user’s convenience.

public class CellsDataTableFactory

Inheritance

objectCellsDataTableFactory

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Methods

GetInstance(int[], string[])

Creates ICellsDataTable from given sequence of int values.

public ICellsDataTable GetInstance(int[] vals, string[] columnNames)

Parameters

vals int[]

int values to build table

columnNames string[]

Column names of the table. Its length can only be either 1(build table by the int values vertically) or length of the int values(build table by the int values horizontally)

Returns

ICellsDataTable

Instance of ICellsDataTable

GetInstance(int[], bool)

Creates ICellsDataTable from given sequence of int values.

public ICellsDataTable GetInstance(int[] vals, bool vertial)

Parameters

vals int[]

int values to build table

vertial bool

whether build table by the int values vertiacally(true) or horizontally(false)

Returns

ICellsDataTable

Instance of ICellsDataTable

GetInstance(double[], string[])

Creates ICellsDataTable from given sequence of double values.

public ICellsDataTable GetInstance(double[] vals, string[] columnNames)

Parameters

vals double[]

double values to build table

columnNames string[]

Column names of the table. Its length can only be either 1(build table by the double values vertically) or length of the double values(build table by the double values horizontally)

Returns

ICellsDataTable

Instance of ICellsDataTable

GetInstance(double[], bool)

Creates ICellsDataTable from given sequence of double values.

public ICellsDataTable GetInstance(double[] vals, bool vertial)

Parameters

vals double[]

double values to build table

vertial bool

whether build table by the double values vertiacally(true) or horizontally(false)

Returns

ICellsDataTable

Instance of ICellsDataTable

GetInstance(object[], string[])

Creates ICellsDataTable from given sequence of objects.

public ICellsDataTable GetInstance(object[] vals, string[] columnNames)

Parameters

vals object[]

objects to build table

columnNames string[]

Column names of the table. Its length can only be either 1(build table by the objects vertically) or length of the objects(build table by the objects horizontally)

Returns

ICellsDataTable

Instance of ICellsDataTable

GetInstance(object[][], bool, string[])

Creates ICellsDataTable from given sequence of objects.

public ICellsDataTable GetInstance(object[][] vals, bool hasHeader, string[] columnNames)

Parameters

vals object[][]

objects to build table

hasHeader bool

Indicates whether the first row is header row.

columnNames string[]

Column names of the table. Its length can only be either 1(build table by the objects vertically) or length of the objects(build table by the objects horizontally)

Returns

ICellsDataTable

Instance of ICellsDataTable

GetInstance(object[], bool)

Creates ICellsDataTable from given sequence of objects.

public ICellsDataTable GetInstance(object[] vals, bool vertial)

Parameters

vals object[]

objects to build table

vertial bool

whether build table by the objects vertiacally(true) or horizontally(false)

Returns

ICellsDataTable

Instance of ICellsDataTable

GetInstance(int[,])

Creates ICellsDataTable from given 2D array.

public ICellsDataTable GetInstance(int[,] vals)

Parameters

vals int[,]

int values to build table

Returns

ICellsDataTable

Instance of ICellsDataTable

GetInstance(double[,])

Creates ICellsDataTable from given 2D array.

public ICellsDataTable GetInstance(double[,] vals)

Parameters

vals double[,]

double values to build table

Returns

ICellsDataTable

Instance of ICellsDataTable

GetInstance(object[,])

Creates ICellsDataTable from given 2D array.

public ICellsDataTable GetInstance(object[,] vals)

Parameters

vals object[,]

objects to build table

Returns

ICellsDataTable

Instance of ICellsDataTable

GetInstance(ICollection)

Creates ICellsDataTable from given collection.

public ICellsDataTable GetInstance(ICollection collection)

Parameters

collection ICollection

the collection to build table

Returns

ICellsDataTable

Instance of ICellsDataTable

GetInstance(ICollection, bool)

Creates ICellsDataTable from given collection.

public ICellsDataTable GetInstance(ICollection collection, bool hasHeader)

Parameters

collection ICollection

the collection to build table

hasHeader bool

Indicates whether the first row is header

Returns

ICellsDataTable

Instance of ICellsDataTable