
## Worksheet class

Encapsulates the object that represents a single worksheet.



The Worksheet type exposes the following members:

### Properties
| Property | Description |
| :- | :- |
| [protection](/cells/python-net/aspose.cells/worksheet/protection) | Represents the various types of protection options available for a worksheet. Supports advanced protection options in ExcelXP and above version. |
| [unique_id](/cells/python-net/aspose.cells/worksheet/unique_id) | Gets and sets the unique id, it is same as {15DB5C3C-A5A1-48AF-8F25-3D86AC232D4F}. |
| [workbook](/cells/python-net/aspose.cells/worksheet/workbook) | Gets the workbook object which contains this sheet. |
| [cells](/cells/python-net/aspose.cells/worksheet/cells) | Gets the [`Worksheet.cells`](/cells/python-net/aspose.cells/worksheet#cells) collection. |
| [query_tables](/cells/python-net/aspose.cells/worksheet/query_tables) | Gets [`QueryTableCollection`](/cells/python-net/aspose.cells/querytablecollection) in the worksheet. |
| [type](/cells/python-net/aspose.cells/worksheet/type) | Represents worksheet type. |
| [name](/cells/python-net/aspose.cells/worksheet/name) | Gets or sets the name of the worksheet. |
| [show_formulas](/cells/python-net/aspose.cells/worksheet/show_formulas) | Indicates whether to show formulas or their results. |
| [is_gridlines_visible](/cells/python-net/aspose.cells/worksheet/is_gridlines_visible) | Gets or sets a value indicating whether the gridlines are visible.Default is true. |
| [is_row_column_headers_visible](/cells/python-net/aspose.cells/worksheet/is_row_column_headers_visible) | Gets or sets a value indicating whether the worksheet will display row and column headers.<br/>Default is true. |
| [pane_state](/cells/python-net/aspose.cells/worksheet/pane_state) | Indicates whether the pane has horizontal or vertical splits, and whether those splits are frozen. |
| [display_zeros](/cells/python-net/aspose.cells/worksheet/display_zeros) | True if zero values are displayed. |
| [display_right_to_left](/cells/python-net/aspose.cells/worksheet/display_right_to_left) | Indicates if the specified worksheet is displayed from right to left instead of from left to right.<br/>Default is false. |
| [is_outline_shown](/cells/python-net/aspose.cells/worksheet/is_outline_shown) | Indicates whether to show outline. |
| [is_selected](/cells/python-net/aspose.cells/worksheet/is_selected) | Indicates whether this worksheet is selected when the workbook is opened. |
| [pivot_tables](/cells/python-net/aspose.cells/worksheet/pivot_tables) | Gets all pivot tables in this worksheet. |
| [list_objects](/cells/python-net/aspose.cells/worksheet/list_objects) | Gets all ListObjects in this worksheet. |
| [tab_id](/cells/python-net/aspose.cells/worksheet/tab_id) | Specifies the internal identifier for the sheet. |
| [horizontal_page_breaks](/cells/python-net/aspose.cells/worksheet/horizontal_page_breaks) | Gets the [`HorizontalPageBreakCollection`](/cells/python-net/aspose.cells/horizontalpagebreakcollection) collection. |
| [vertical_page_breaks](/cells/python-net/aspose.cells/worksheet/vertical_page_breaks) | Gets the [`VerticalPageBreakCollection`](/cells/python-net/aspose.cells/verticalpagebreakcollection) collection. |
| [hyperlinks](/cells/python-net/aspose.cells/worksheet/hyperlinks) | Gets the [`HyperlinkCollection`](/cells/python-net/aspose.cells/hyperlinkcollection) collection. |
| [page_setup](/cells/python-net/aspose.cells/worksheet/page_setup) | Represents the page setup description in this sheet. |
| [auto_filter](/cells/python-net/aspose.cells/worksheet/auto_filter) | Represents auto filter for the specified worksheet. |
| [has_autofilter](/cells/python-net/aspose.cells/worksheet/has_autofilter) | Indicates whether this worksheet has auto filter. |
| [transition_evaluation](/cells/python-net/aspose.cells/worksheet/transition_evaluation) | Indicates whether the Transition Formula Evaluation (Lotus compatibility) option is enabled. |
| [transition_entry](/cells/python-net/aspose.cells/worksheet/transition_entry) | Indicates whether the Transition Formula Entry (Lotus compatibility) option is enabled. |
| [visibility_type](/cells/python-net/aspose.cells/worksheet/visibility_type) | Indicates the visible state for this sheet. |
| [is_visible](/cells/python-net/aspose.cells/worksheet/is_visible) | Represents if the worksheet is visible. |
| [sparkline_groups](/cells/python-net/aspose.cells/worksheet/sparkline_groups) | Gets the sparkline groups in the worksheet. |
| [charts](/cells/python-net/aspose.cells/worksheet/charts) | Gets a [`Chart`](/cells/python-net/aspose.cells.charts/chart) collection |
| [comments](/cells/python-net/aspose.cells/worksheet/comments) | Gets the [`Comment`](/cells/python-net/aspose.cells/comment) collection. |
| [pictures](/cells/python-net/aspose.cells/worksheet/pictures) | Gets a [`Picture`](/cells/python-net/aspose.cells.drawing/picture) collection. |
| [text_boxes](/cells/python-net/aspose.cells/worksheet/text_boxes) | Gets a [`TextBox`](/cells/python-net/aspose.cells.drawing/textbox) collection. |
| [check_boxes](/cells/python-net/aspose.cells/worksheet/check_boxes) | Gets a [`CheckBox`](/cells/python-net/aspose.cells.drawing/checkbox) collection. |
| [ole_objects](/cells/python-net/aspose.cells/worksheet/ole_objects) | Represents a collection of [`OleObject`](/cells/python-net/aspose.cells.drawing/oleobject) in a worksheet. |
| [shapes](/cells/python-net/aspose.cells/worksheet/shapes) | Returns all drawing shapes in this worksheet. |
| [slicers](/cells/python-net/aspose.cells/worksheet/slicers) | Get the Slicer collection in the worksheet |
| [timelines](/cells/python-net/aspose.cells/worksheet/timelines) | Get the Timeline collection in the worksheet |
| [index](/cells/python-net/aspose.cells/worksheet/index) | Gets the index of sheet in the worksheet collection. |
| [is_protected](/cells/python-net/aspose.cells/worksheet/is_protected) | Indicates if the worksheet is protected. |
| [validations](/cells/python-net/aspose.cells/worksheet/validations) | Gets the data validation setting collection in the worksheet. |
| [allow_edit_ranges](/cells/python-net/aspose.cells/worksheet/allow_edit_ranges) | Gets the allow edit range collection in the worksheet. |
| [error_check_options](/cells/python-net/aspose.cells/worksheet/error_check_options) | Gets error check setting applied on certain ranges. |
| [outline](/cells/python-net/aspose.cells/worksheet/outline) | Gets the outline on this worksheet. |
| [first_visible_row](/cells/python-net/aspose.cells/worksheet/first_visible_row) | Represents first visible row index. |
| [first_visible_column](/cells/python-net/aspose.cells/worksheet/first_visible_column) | Represents first visible column index. |
| [zoom](/cells/python-net/aspose.cells/worksheet/zoom) | Represents the scaling factor in percentage. It should be between 10 and 400. |
| [view_type](/cells/python-net/aspose.cells/worksheet/view_type) | Gets and sets the view type. |
| [is_page_break_preview](/cells/python-net/aspose.cells/worksheet/is_page_break_preview) | Indicates whether the specified worksheet is shown in normal view or page break preview. |
| [is_ruler_visible](/cells/python-net/aspose.cells/worksheet/is_ruler_visible) | Indicates whether the ruler is visible. This property is only applied for page break preview. |
| [tab_color](/cells/python-net/aspose.cells/worksheet/tab_color) | Represents worksheet tab color. |
| [gridline_color](/cells/python-net/aspose.cells/worksheet/gridline_color) | Gets and sets the color of gridline |
| [code_name](/cells/python-net/aspose.cells/worksheet/code_name) | Gets worksheet code name. |
| [background_image](/cells/python-net/aspose.cells/worksheet/background_image) | Gets and sets worksheet background image. |
| [conditional_formattings](/cells/python-net/aspose.cells/worksheet/conditional_formattings) | Gets the ConditionalFormattings in the worksheet. |
| [active_cell](/cells/python-net/aspose.cells/worksheet/active_cell) | Gets or sets the active cell in the worksheet. |
| [custom_properties](/cells/python-net/aspose.cells/worksheet/custom_properties) | Gets an object representing <br/>the identifier information associated with a worksheet. |
| [smart_tag_setting](/cells/python-net/aspose.cells/worksheet/smart_tag_setting) | Gets all [`SmartTagCollection`](/cells/python-net/aspose.cells.markup/smarttagcollection) objects of the worksheet. |
| [scenarios](/cells/python-net/aspose.cells/worksheet/scenarios) | Gets the collection of [`Scenario`](/cells/python-net/aspose.cells/scenario). |
| [cell_watches](/cells/python-net/aspose.cells/worksheet/cell_watches) | Gets collection of cells on this worksheet being watched in the 'watch window'. |


### Methods
| Method | Description |
| :- | :- |
| [`freeze_panes(self, row, column, freezed_rows, freezed_columns)`](/cells/python-net/aspose.cells/worksheet/freeze_panes/#int-int-int-int) | Freezes panes at the specified cell in the worksheet. |
| [`freeze_panes(self, cell_name, freezed_rows, freezed_columns)`](/cells/python-net/aspose.cells/worksheet/freeze_panes/#system.string-int-int) | Freezes panes at the specified cell in the worksheet. |
| [`copy(self, source_sheet)`](/cells/python-net/aspose.cells/worksheet/copy/#aspose.cells.worksheet) | Copies contents and formats from another worksheet. |
| [`copy(self, source_sheet, copy_options)`](/cells/python-net/aspose.cells/worksheet/copy/#aspose.cells.worksheet-aspose.cells.copyoptions) | Copies contents and formats from another worksheet. |
| [`auto_fit_column(self, column_index, first_row, last_row)`](/cells/python-net/aspose.cells/worksheet/auto_fit_column/#int-int-int) | Autofits the column width. |
| [`auto_fit_column(self, column_index)`](/cells/python-net/aspose.cells/worksheet/auto_fit_column/#int) | Autofits the column width. |
| [`auto_fit_columns(self)`](/cells/python-net/aspose.cells/worksheet/auto_fit_columns/#) | Autofits all columns in this worksheet. |
| [`auto_fit_columns(self, options)`](/cells/python-net/aspose.cells/worksheet/auto_fit_columns/#aspose.cells.autofitteroptions) | Autofits all columns in this worksheet. |
| [`auto_fit_columns(self, first_column, last_column)`](/cells/python-net/aspose.cells/worksheet/auto_fit_columns/#int-int) | Autofits the columns width. |
| [`auto_fit_columns(self, first_column, last_column, options)`](/cells/python-net/aspose.cells/worksheet/auto_fit_columns/#int-int-aspose.cells.autofitteroptions) | Autofits the columns width. |
| [`auto_fit_columns(self, first_row, first_column, last_row, last_column)`](/cells/python-net/aspose.cells/worksheet/auto_fit_columns/#int-int-int-int) | Autofits the columns width. |
| [`auto_fit_columns(self, first_row, first_column, last_row, last_column, options)`](/cells/python-net/aspose.cells/worksheet/auto_fit_columns/#int-int-int-int-aspose.cells.autofitteroptions) | Autofits the columns width. |
| [`auto_fit_row(self, row_index, first_column, last_column)`](/cells/python-net/aspose.cells/worksheet/auto_fit_row/#int-int-int) | Autofits the row height. |
| [`auto_fit_row(self, row_index, first_column, last_column, options)`](/cells/python-net/aspose.cells/worksheet/auto_fit_row/#int-int-int-aspose.cells.autofitteroptions) | Autofits the row height. |
| [`auto_fit_row(self, start_row, end_row, start_column, end_column)`](/cells/python-net/aspose.cells/worksheet/auto_fit_row/#int-int-int-int) | Autofits row height in a rectangle range. |
| [`auto_fit_row(self, row_index)`](/cells/python-net/aspose.cells/worksheet/auto_fit_row/#int) | Autofits the row height. |
| [`auto_fit_rows(self)`](/cells/python-net/aspose.cells/worksheet/auto_fit_rows/#) | Autofits all rows in this worksheet. |
| [`auto_fit_rows(self, only_auto)`](/cells/python-net/aspose.cells/worksheet/auto_fit_rows/#bool) | Autofits all rows in this worksheet. |
| [`auto_fit_rows(self, options)`](/cells/python-net/aspose.cells/worksheet/auto_fit_rows/#aspose.cells.autofitteroptions) | Autofits all rows in this worksheet. |
| [`auto_fit_rows(self, start_row, end_row)`](/cells/python-net/aspose.cells/worksheet/auto_fit_rows/#int-int) | Autofits row height in a range. |
| [`auto_fit_rows(self, start_row, end_row, options)`](/cells/python-net/aspose.cells/worksheet/auto_fit_rows/#int-int-aspose.cells.autofitteroptions) | Autofits row height in a range. |
| [`protect(self, type)`](/cells/python-net/aspose.cells/worksheet/protect/#aspose.cells.protectiontype) | Protects worksheet. |
| [`protect(self, type, password, old_password)`](/cells/python-net/aspose.cells/worksheet/protect/#aspose.cells.protectiontype-system.string-system.string) | Protects worksheet. |
| [`unprotect(self)`](/cells/python-net/aspose.cells/worksheet/unprotect/#) | Unprotects worksheet. |
| [`unprotect(self, password)`](/cells/python-net/aspose.cells/worksheet/unprotect/#system.string) | Unprotects worksheet. |
| [`calculate_formula(self, formula)`](/cells/python-net/aspose.cells/worksheet/calculate_formula/#system.string) | Calculates a formula. |
| [`calculate_formula(self, formula, opts)`](/cells/python-net/aspose.cells/worksheet/calculate_formula/#system.string-aspose.cells.calculationoptions) | Calculates a formula expression directly. |
| [`calculate_formula(self, formula, p_opts, c_opts, base_cell_row, base_cell_column, calculation_data)`](/cells/python-net/aspose.cells/worksheet/calculate_formula/#system.string-aspose.cells.formulaparseoptions-aspose.cells.calculationoptions-int-int-aspose.cells.calculationdata) | Calculates a formula expression directly. |
| [`calculate_formula(self, options, recursive)`](/cells/python-net/aspose.cells/worksheet/calculate_formula/#aspose.cells.calculationoptions-bool) | Calculates all formulas in this worksheet. |
| [`calculate_array_formula(self, formula, opts)`](/cells/python-net/aspose.cells/worksheet/calculate_array_formula/#system.string-aspose.cells.calculationoptions) | Calculates a formula as array formula. |
| [`calculate_array_formula(self, formula, opts, max_row_count, max_column_count)`](/cells/python-net/aspose.cells/worksheet/calculate_array_formula/#system.string-aspose.cells.calculationoptions-int-int) | Calculates a formula as array formula. |
| [`calculate_array_formula(self, formula, p_opts, c_opts, base_cell_row, base_cell_column, max_row_count, max_column_count, calculation_data)`](/cells/python-net/aspose.cells/worksheet/calculate_array_formula/#system.string-aspose.cells.formulaparseoptions-aspose.cells.calculationoptions-int-int-int-int-aspose.cells.calculationdata) | Calculates a formula as array formula. |
| [`refresh_pivot_tables(self)`](/cells/python-net/aspose.cells/worksheet/refresh_pivot_tables/#) | Refreshes all the PivotTables in this Worksheet. |
| [`refresh_pivot_tables(self, option)`](/cells/python-net/aspose.cells/worksheet/refresh_pivot_tables/#aspose.cells.pivot.pivottablerefreshoption) | Refreshes all the PivotTables in this Worksheet. |
| [`get_panes(self)`](/cells/python-net/aspose.cells/worksheet/get_panes/#) | Gets the window panes. |
| [`get_freezed_panes(self, row, column, freezed_rows, freezed_columns)`](/cells/python-net/aspose.cells/worksheet/get_freezed_panes/#any-any-any-any) | Gets the freeze panes. |
| [`split(self)`](/cells/python-net/aspose.cells/worksheet/split/#) | Splits window. |
| [`un_freeze_panes(self)`](/cells/python-net/aspose.cells/worksheet/un_freeze_panes/#) | Unfreezes panes in the worksheet. |
| [`remove_split(self)`](/cells/python-net/aspose.cells/worksheet/remove_split/#) | Removes split window. |
| [`add_page_breaks(self, cell_name)`](/cells/python-net/aspose.cells/worksheet/add_page_breaks/#system.string) | Adds page break. |
| [`filter(self, ca)`](/cells/python-net/aspose.cells/worksheet/filter/#aspose.cells.cellarea) | Filters the range. |
| [`get_advanced_filter(self)`](/cells/python-net/aspose.cells/worksheet/get_advanced_filter/#) | Gets the settings of advanced filter. |
| [`advanced_filter(self, is_filter, list_range, criteria_range, copy_to, unique_record_only)`](/cells/python-net/aspose.cells/worksheet/advanced_filter/#bool-system.string-system.string-system.string-bool) | Filters data using complex criteria. |
| [`remove_auto_filter(self)`](/cells/python-net/aspose.cells/worksheet/remove_auto_filter/#) | Removes the auto filter of the worksheet. |
| [`set_visible(self, is_visible, ignore_error)`](/cells/python-net/aspose.cells/worksheet/set_visible/#bool-bool) | Sets the visible options. |
| [`select_range(self, start_row, start_column, total_rows, total_columns, remove_others)`](/cells/python-net/aspose.cells/worksheet/select_range/#int-int-int-int-bool) | Selects a range. |
| [`remove(self)`](/cells/python-net/aspose.cells/worksheet/remove/#) | Remove current sheet (CELLSPYTHONNET-192,User requests to add this API) |
| [`remove_all_drawing_objects(self)`](/cells/python-net/aspose.cells/worksheet/remove_all_drawing_objects/#) | Removes all drawing objects in this worksheet. |
| [`clear_comments(self)`](/cells/python-net/aspose.cells/worksheet/clear_comments/#) | Clears all comments in designer spreadsheet. |
| [`move_to(self, index)`](/cells/python-net/aspose.cells/worksheet/move_to/#int) | Moves the sheet to another location in the spreadsheet. |
| [`replace(self, old_string, new_string)`](/cells/python-net/aspose.cells/worksheet/replace/#system.string-system.string) | Replaces all cells' text with a new string. |
| [`get_selected_ranges(self)`](/cells/python-net/aspose.cells/worksheet/get_selected_ranges/#) | Gets selected ranges of cells in the designer spreadsheet. |
| [`get_selected_areas(self)`](/cells/python-net/aspose.cells/worksheet/get_selected_areas/#) | Gets selected ranges of cells in the designer spreadsheet. |
| [`get_printing_page_breaks(self, options)`](/cells/python-net/aspose.cells/worksheet/get_printing_page_breaks/#aspose.cells.rendering.imageorprintoptions) | Gets automatic page breaks. |
| [`start_access_cache(self, opts)`](/cells/python-net/aspose.cells/worksheet/start_access_cache/#aspose.cells.accesscacheoptions) | Starts the session that uses caches to access the data in this worksheet. |
| [`close_access_cache(self, opts)`](/cells/python-net/aspose.cells/worksheet/close_access_cache/#aspose.cells.accesscacheoptions) | Closes the session that uses caches to access the data in this worksheet. |
| [`convert_formula_reference_style(self, formula, to_r1c1, base_cell_row, base_cell_column)`](/cells/python-net/aspose.cells/worksheet/convert_formula_reference_style/#system.string-bool-int-int) | Converts the formula reference style. |
| [`xml_map_query(self, path, xml_map)`](/cells/python-net/aspose.cells/worksheet/xml_map_query/#system.string-aspose.cells.xmlmap) | Query cell areas that mapped/linked to the specific path of xml map. |



### Example 


The following example shows how to freeze panes and insert hyperlink to worksheet with .Net or VB.

```python
from aspose.cells import Workbook

workbook = Workbook()
sheet = workbook.worksheets[0]
# Freeze panes at "AS40" with 10 rows and 10 columns
sheet.freeze_panes("AS40", 10, 10)
# Add a hyperlink in Cell A1
sheet.hyperlinks.add("A1", 1, 1, "http://www.aspose.com")

```

### See Also
* module [`aspose.cells`](..)
* class [`Chart`](/cells/python-net/aspose.cells.charts/chart)
* class [`CheckBox`](/cells/python-net/aspose.cells.drawing/checkbox)
* class [`Comment`](/cells/python-net/aspose.cells/comment)
* class [`HorizontalPageBreakCollection`](/cells/python-net/aspose.cells/horizontalpagebreakcollection)
* class [`HyperlinkCollection`](/cells/python-net/aspose.cells/hyperlinkcollection)
* class [`OleObject`](/cells/python-net/aspose.cells.drawing/oleobject)
* class [`Picture`](/cells/python-net/aspose.cells.drawing/picture)
* class [`QueryTableCollection`](/cells/python-net/aspose.cells/querytablecollection)
* class [`Scenario`](/cells/python-net/aspose.cells/scenario)
* class [`SmartTagCollection`](/cells/python-net/aspose.cells.markup/smarttagcollection)
* class [`TextBox`](/cells/python-net/aspose.cells.drawing/textbox)
* class [`VerticalPageBreakCollection`](/cells/python-net/aspose.cells/verticalpagebreakcollection)
