## GridWorksheetCollection class

Encapsulates a collection of [`GridWorksheet`](../gridworksheet/) objects.

```csharp
public class GridWorksheetCollection : CollectionBase, ISerializable
```

## Properties

| Name | Description |
| --- | --- |
| [ActiveSheetIndex](../../aspose.cells.gridweb.data/gridworksheetcollection/activesheetindex/) { get; set; } | Represents the index of active worksheet when the spreadsheet is opened. |
| [Count](../../aspose.cells.gridweb.data/gridworksheetcollection/count/) { get; } | Gets the size of enumerator |
| [DefaultFontName](../../aspose.cells.gridweb.data/gridworksheetcollection/defaultfontname/) { get; set; } | Gets or sets the control's default font name. |
| [DefaultFontSize](../../aspose.cells.gridweb.data/gridworksheetcollection/defaultfontsize/) { get; set; } | ????????? |
| [IsSynchronized](../../aspose.cells.gridweb.data/gridworksheetcollection/issynchronized/) { get; } | Gets a value indicating if access to the ICollection is synchronized (thread-safe). |
| [Item](../../aspose.cells.gridweb.data/gridworksheetcollection/item/) { get; } | Gets the [`GridWorksheet`](../gridworksheet/) element at the specified index. (2 indexers) |
| [Names](../../aspose.cells.gridweb.data/gridworksheetcollection/names/) { get; } | Gets the collection of all the Name objects in the spreadsheet. |
| [NumberDecimalSeparator](../../aspose.cells.gridweb.data/gridworksheetcollection/numberdecimalseparator/) { get; set; } | Gets or sets the decimal separator for formatting/parsing numeric values. Default is the decimal separator of current Region. |
| [SyncRoot](../../aspose.cells.gridweb.data/gridworksheetcollection/syncroot/) { get; } | Gets an object that can be used to synchronize access to the ICollection. |

## Methods

| Name | Description |
| --- | --- |
| [Add](../../aspose.cells.gridweb.data/gridworksheetcollection/add/#add_1)() | Adds a worksheet to the collection. |
| [Add](../../aspose.cells.gridweb.data/gridworksheetcollection/add/#add_2)(object) | Adds a sheet object. |
| [Add](../../aspose.cells.gridweb.data/gridworksheetcollection/add/#add)(string) | Adds a worksheet to the collection. |
| [AddCopy](../../aspose.cells.gridweb.data/gridworksheetcollection/addcopy/#addcopy)(int) | Adds a worksheet to the collection and copies data from an existed worksheet. |
| [AddCopy](../../aspose.cells.gridweb.data/gridworksheetcollection/addcopy/#addcopy_1)(string) | Adds a worksheet to the collection and copies data from an existed worksheet. |
| [CalculateFormula](../../aspose.cells.gridweb.data/gridworksheetcollection/calculateformula/)() | Calculates the result of formulas. |
| [Clear](../../aspose.cells.gridweb.data/gridworksheetcollection/clear/#clear)() | Clear all worksheets. |
| [CopyTo](../../aspose.cells.gridweb.data/gridworksheetcollection/copyto/)(Array, int) | Copys contents to an array. |
| [GetEnumerator](../../aspose.cells.gridweb.data/gridworksheetcollection/getenumerator/#getenumerator)() | Gets the rows enumerator |
| [ImportDataView](../../aspose.cells.gridweb.data/gridworksheetcollection/importdataview/#importdataview)(DataView, TableItemStyle, TableItemStyle) | Imports from a DataView. Creates a sheet with the DataView's table name automatically. |
| [ImportDataView](../../aspose.cells.gridweb.data/gridworksheetcollection/importdataview/#importdataview_1)(DataView, TableItemStyle, TableItemStyle, string, int, int) | Imports from a DataView to the specified sheet and position. |
| [Insert](../../aspose.cells.gridweb.data/gridworksheetcollection/insert/)(int, string) | Insert a worksheet. |
| [RemoveAt](../../aspose.cells.gridweb.data/gridworksheetcollection/removeat/#removeat)(int) | Removes the element at a specified index. |
| [RemoveAt](../../aspose.cells.gridweb.data/gridworksheetcollection/removeat/#removeat_2)(string) | Removes the element at a specified name. |
| [SetVisible](../../aspose.cells.gridweb.data/gridworksheetcollection/setvisible/)(string, bool) | Sets the visible for the sheet . |
| [SwapSheet](../../aspose.cells.gridweb.data/gridworksheetcollection/swapsheet/)(int, int) | Swaps the two sheets. |

### See Also

* namespace [Aspose.Cells.GridWeb.Data](../../aspose.cells.gridweb.data/)
* assembly [Aspose.Cells.GridWeb](../../)


