XlsDataValidationTable module

class XlsDataValidationTable.XlsDataValidationTable

Bases: SpireObject, IDataValidationTable

Represents a table of data validations in an Excel worksheet.

This class provides properties and methods for accessing and manipulating data validations in an Excel worksheet, including finding, removing, and cloning validations. It extends SpireObject and implements the IDataValidationTable interface.

Clone(parent: SpireObject) SpireObject

Creates a clone of this data validation table.

Parameters:

parent (SpireObject) – The parent object for the cloned table.

Returns:

A new instance of the data validation table with the same validations.

Return type:

SpireObject

FindDataValidation(iCellIndex: int) IDataValidation

Finds the data validation for a cell with the specified index.

Parameters:

iCellIndex (int) – The index of the cell.

Returns:

The data validation object for the specified cell, or None if not found.

Return type:

IDataValidation

Remove(rectangles: List[Rectangle])

Removes data validations from the specified rectangular regions.

Parameters:

rectangles (List[Rectangle]) – A list of Rectangle objects representing the regions from which to remove data validations.

property ShapesCount: int

Gets the number of data validation shapes in the table.

Returns:

The number of data validation shapes.

Return type:

int

property Workbook: Workbook

Gets the workbook containing this data validation table.

Returns:

The workbook object containing this data validation table.

Return type:

Workbook

property Worksheet: Worksheet

Gets the worksheet containing this data validation table.

Returns:

The worksheet object containing this data validation table.

Return type:

Worksheet

get_Item(index: int) XlsDataValidationCollection

Gets the data validation collection at the specified index.

Parameters:

index (int) – The zero-based index of the data validation collection.

Returns:

The data validation collection at the specified index.

Return type:

XlsDataValidationCollection