# GC.Spread.Sheets.Worksheet

## Content

# Class: Worksheet

[Spread](../modules/GC.Spread).[Sheets](../modules/GC.Spread.Sheets).Worksheet

## Hierarchy

- **`Worksheet`**

  ↳ [`TemplateSheet`](GC.Spread.Report.TemplateSheet)

## Table of contents

### Constructors

- [constructor](GC.Spread.Sheets.Worksheet#constructor)

### Properties

- [autoGenerateColumns](GC.Spread.Sheets.Worksheet#autogeneratecolumns)
- [cellStates](GC.Spread.Sheets.Worksheet#cellstates)
- [charts](GC.Spread.Sheets.Worksheet#charts)
- [columnOutlines](GC.Spread.Sheets.Worksheet#columnoutlines)
- [comments](GC.Spread.Sheets.Worksheet#comments)
- [conditionalFormats](GC.Spread.Sheets.Worksheet#conditionalformats)
- [dataCharts](GC.Spread.Sheets.Worksheet#datacharts)
- [dataRanges](GC.Spread.Sheets.Worksheet#dataranges)
- [defaults](GC.Spread.Sheets.Worksheet#defaults)
- [floatingObjects](GC.Spread.Sheets.Worksheet#floatingobjects)
- [options](GC.Spread.Sheets.Worksheet#options)
- [outlineColumn](GC.Spread.Sheets.Worksheet#outlinecolumn)
- [pictures](GC.Spread.Sheets.Worksheet#pictures)
- [pivotTables](GC.Spread.Sheets.Worksheet#pivottables)
- [rowOutlines](GC.Spread.Sheets.Worksheet#rowoutlines)
- [shapes](GC.Spread.Sheets.Worksheet#shapes)
- [slicers](GC.Spread.Sheets.Worksheet#slicers)
- [tables](GC.Spread.Sheets.Worksheet#tables)

### Methods

- [addColumns](GC.Spread.Sheets.Worksheet#addcolumns)
- [addCustomFunction](GC.Spread.Sheets.Worksheet#addcustomfunction)
- [addCustomName](GC.Spread.Sheets.Worksheet#addcustomname)
- [addNamedStyle](GC.Spread.Sheets.Worksheet#addnamedstyle)
- [addRows](GC.Spread.Sheets.Worksheet#addrows)
- [addSelection](GC.Spread.Sheets.Worksheet#addselection)
- [addSpan](GC.Spread.Sheets.Worksheet#addspan)
- [addSpans](GC.Spread.Sheets.Worksheet#addspans)
- [autoFitColumn](GC.Spread.Sheets.Worksheet#autofitcolumn)
- [autoFitRow](GC.Spread.Sheets.Worksheet#autofitrow)
- [autoMerge](GC.Spread.Sheets.Worksheet#automerge)
- [backgroundImage](GC.Spread.Sheets.Worksheet#backgroundimage)
- [bind](GC.Spread.Sheets.Worksheet#bind)
- [bindColumn](GC.Spread.Sheets.Worksheet#bindcolumn)
- [bindColumns](GC.Spread.Sheets.Worksheet#bindcolumns)
- [clear](GC.Spread.Sheets.Worksheet#clear)
- [clearCustomFunctions](GC.Spread.Sheets.Worksheet#clearcustomfunctions)
- [clearCustomNames](GC.Spread.Sheets.Worksheet#clearcustomnames)
- [clearPendingChanges](GC.Spread.Sheets.Worksheet#clearpendingchanges)
- [clearSelection](GC.Spread.Sheets.Worksheet#clearselection)
- [copyTo](GC.Spread.Sheets.Worksheet#copyto)
- [currentTheme](GC.Spread.Sheets.Worksheet#currenttheme)
- [deleteColumns](GC.Spread.Sheets.Worksheet#deletecolumns)
- [deleteRows](GC.Spread.Sheets.Worksheet#deleterows)
- [editorStatus](GC.Spread.Sheets.Worksheet#editorstatus)
- [endEdit](GC.Spread.Sheets.Worksheet#endedit)
- [fillAuto](GC.Spread.Sheets.Worksheet#fillauto)
- [fromJSON](GC.Spread.Sheets.Worksheet#fromjson)
- [frozenColumnCount](GC.Spread.Sheets.Worksheet#frozencolumncount)
- [frozenRowCount](GC.Spread.Sheets.Worksheet#frozenrowcount)
- [frozenTrailingColumnCount](GC.Spread.Sheets.Worksheet#frozentrailingcolumncount)
- [frozenTrailingRowCount](GC.Spread.Sheets.Worksheet#frozentrailingrowcount)
- [getActiveColumnIndex](GC.Spread.Sheets.Worksheet#getactivecolumnindex)
- [getActiveRowIndex](GC.Spread.Sheets.Worksheet#getactiverowindex)
- [getActualStyle](GC.Spread.Sheets.Worksheet#getactualstyle)
- [getAltText](GC.Spread.Sheets.Worksheet#getalttext)
- [getArray](GC.Spread.Sheets.Worksheet#getarray)
- [getBindingPath](GC.Spread.Sheets.Worksheet#getbindingpath)
- [getCell](GC.Spread.Sheets.Worksheet#getcell)
- [getCellRect](GC.Spread.Sheets.Worksheet#getcellrect)
- [getCellType](GC.Spread.Sheets.Worksheet#getcelltype)
- [getColumnCount](GC.Spread.Sheets.Worksheet#getcolumncount)
- [getColumnPageBreak](GC.Spread.Sheets.Worksheet#getcolumnpagebreak)
- [getColumnResizable](GC.Spread.Sheets.Worksheet#getcolumnresizable)
- [getColumnVisible](GC.Spread.Sheets.Worksheet#getcolumnvisible)
- [getColumnWidth](GC.Spread.Sheets.Worksheet#getcolumnwidth)
- [getCsv](GC.Spread.Sheets.Worksheet#getcsv)
- [getCustomFunction](GC.Spread.Sheets.Worksheet#getcustomfunction)
- [getCustomName](GC.Spread.Sheets.Worksheet#getcustomname)
- [getCustomNames](GC.Spread.Sheets.Worksheet#getcustomnames)
- [getDataColumnName](GC.Spread.Sheets.Worksheet#getdatacolumnname)
- [getDataItem](GC.Spread.Sheets.Worksheet#getdataitem)
- [getDataSource](GC.Spread.Sheets.Worksheet#getdatasource)
- [getDataValidator](GC.Spread.Sheets.Worksheet#getdatavalidator)
- [getDefaultStyle](GC.Spread.Sheets.Worksheet#getdefaultstyle)
- [getDefaultValue](GC.Spread.Sheets.Worksheet#getdefaultvalue)
- [getDeletedRows](GC.Spread.Sheets.Worksheet#getdeletedrows)
- [getDependents](GC.Spread.Sheets.Worksheet#getdependents)
- [getDirtyCells](GC.Spread.Sheets.Worksheet#getdirtycells)
- [getDirtyRows](GC.Spread.Sheets.Worksheet#getdirtyrows)
- [getFormatter](GC.Spread.Sheets.Worksheet#getformatter)
- [getFormula](GC.Spread.Sheets.Worksheet#getformula)
- [getFormulaInformation](GC.Spread.Sheets.Worksheet#getformulainformation)
- [getHyperlink](GC.Spread.Sheets.Worksheet#gethyperlink)
- [getId](GC.Spread.Sheets.Worksheet#getid)
- [getInsertRows](GC.Spread.Sheets.Worksheet#getinsertrows)
- [getNamedStyle](GC.Spread.Sheets.Worksheet#getnamedstyle)
- [getNamedStyles](GC.Spread.Sheets.Worksheet#getnamedstyles)
- [getParent](GC.Spread.Sheets.Worksheet#getparent)
- [getPrecedents](GC.Spread.Sheets.Worksheet#getprecedents)
- [getRange](GC.Spread.Sheets.Worksheet#getrange)
- [getRowCount](GC.Spread.Sheets.Worksheet#getrowcount)
- [getRowHeight](GC.Spread.Sheets.Worksheet#getrowheight)
- [getRowPageBreak](GC.Spread.Sheets.Worksheet#getrowpagebreak)
- [getRowResizable](GC.Spread.Sheets.Worksheet#getrowresizable)
- [getRowVisible](GC.Spread.Sheets.Worksheet#getrowvisible)
- [getSelections](GC.Spread.Sheets.Worksheet#getselections)
- [getSortState](GC.Spread.Sheets.Worksheet#getsortstate)
- [getSpans](GC.Spread.Sheets.Worksheet#getspans)
- [getSparkline](GC.Spread.Sheets.Worksheet#getsparkline)
- [getStyle](GC.Spread.Sheets.Worksheet#getstyle)
- [getStyleName](GC.Spread.Sheets.Worksheet#getstylename)
- [getTag](GC.Spread.Sheets.Worksheet#gettag)
- [getText](GC.Spread.Sheets.Worksheet#gettext)
- [getUsedRange](GC.Spread.Sheets.Worksheet#getusedrange)
- [getValue](GC.Spread.Sheets.Worksheet#getvalue)
- [getViewportBottomRow](GC.Spread.Sheets.Worksheet#getviewportbottomrow)
- [getViewportHeight](GC.Spread.Sheets.Worksheet#getviewportheight)
- [getViewportLeftColumn](GC.Spread.Sheets.Worksheet#getviewportleftcolumn)
- [getViewportRightColumn](GC.Spread.Sheets.Worksheet#getviewportrightcolumn)
- [getViewportTopRow](GC.Spread.Sheets.Worksheet#getviewporttoprow)
- [getViewportWidth](GC.Spread.Sheets.Worksheet#getviewportwidth)
- [groupSparkline](GC.Spread.Sheets.Worksheet#groupsparkline)
- [hasPassword](GC.Spread.Sheets.Worksheet#haspassword)
- [hasPendingChanges](GC.Spread.Sheets.Worksheet#haspendingchanges)
- [hitTest](GC.Spread.Sheets.Worksheet#hittest)
- [invalidateLayout](GC.Spread.Sheets.Worksheet#invalidatelayout)
- [isDirtySuspended](GC.Spread.Sheets.Worksheet#isdirtysuspended)
- [isEditing](GC.Spread.Sheets.Worksheet#isediting)
- [isPaintSuspended](GC.Spread.Sheets.Worksheet#ispaintsuspended)
- [isPrintLineVisible](GC.Spread.Sheets.Worksheet#isprintlinevisible)
- [isSelected](GC.Spread.Sheets.Worksheet#isselected)
- [isValid](GC.Spread.Sheets.Worksheet#isvalid)
- [moveTo](GC.Spread.Sheets.Worksheet#moveto)
- [name](GC.Spread.Sheets.Worksheet#name)
- [printInfo](GC.Spread.Sheets.Worksheet#printinfo)
- [protect](GC.Spread.Sheets.Worksheet#protect)
- [recalcAll](GC.Spread.Sheets.Worksheet#recalcall)
- [removeCustomFunction](GC.Spread.Sheets.Worksheet#removecustomfunction)
- [removeCustomName](GC.Spread.Sheets.Worksheet#removecustomname)
- [removeNamedStyle](GC.Spread.Sheets.Worksheet#removenamedstyle)
- [removeSpan](GC.Spread.Sheets.Worksheet#removespan)
- [removeSparkline](GC.Spread.Sheets.Worksheet#removesparkline)
- [repaint](GC.Spread.Sheets.Worksheet#repaint)
- [reset](GC.Spread.Sheets.Worksheet#reset)
- [resumeCalcService](GC.Spread.Sheets.Worksheet#resumecalcservice)
- [resumeDirty](GC.Spread.Sheets.Worksheet#resumedirty)
- [resumeEvent](GC.Spread.Sheets.Worksheet#resumeevent)
- [resumePaint](GC.Spread.Sheets.Worksheet#resumepaint)
- [rowFilter](GC.Spread.Sheets.Worksheet#rowfilter)
- [scroll](GC.Spread.Sheets.Worksheet#scroll)
- [search](GC.Spread.Sheets.Worksheet#search)
- [selectionPolicy](GC.Spread.Sheets.Worksheet#selectionpolicy)
- [selectionUnit](GC.Spread.Sheets.Worksheet#selectionunit)
- [setActiveCell](GC.Spread.Sheets.Worksheet#setactivecell)
- [setAltText](GC.Spread.Sheets.Worksheet#setalttext)
- [setArray](GC.Spread.Sheets.Worksheet#setarray)
- [setArrayFormula](GC.Spread.Sheets.Worksheet#setarrayformula)
- [setBindingPath](GC.Spread.Sheets.Worksheet#setbindingpath)
- [setCellType](GC.Spread.Sheets.Worksheet#setcelltype)
- [setColumnCount](GC.Spread.Sheets.Worksheet#setcolumncount)
- [setColumnPageBreak](GC.Spread.Sheets.Worksheet#setcolumnpagebreak)
- [setColumnResizable](GC.Spread.Sheets.Worksheet#setcolumnresizable)
- [setColumnVisible](GC.Spread.Sheets.Worksheet#setcolumnvisible)
- [setColumnWidth](GC.Spread.Sheets.Worksheet#setcolumnwidth)
- [setCsv](GC.Spread.Sheets.Worksheet#setcsv)
- [setDataSource](GC.Spread.Sheets.Worksheet#setdatasource)
- [setDataValidator](GC.Spread.Sheets.Worksheet#setdatavalidator)
- [setDefaultStyle](GC.Spread.Sheets.Worksheet#setdefaultstyle)
- [setDefaultValue](GC.Spread.Sheets.Worksheet#setdefaultvalue)
- [setFormatter](GC.Spread.Sheets.Worksheet#setformatter)
- [setFormula](GC.Spread.Sheets.Worksheet#setformula)
- [setHyperlink](GC.Spread.Sheets.Worksheet#sethyperlink)
- [setRowCount](GC.Spread.Sheets.Worksheet#setrowcount)
- [setRowHeight](GC.Spread.Sheets.Worksheet#setrowheight)
- [setRowPageBreak](GC.Spread.Sheets.Worksheet#setrowpagebreak)
- [setRowResizable](GC.Spread.Sheets.Worksheet#setrowresizable)
- [setRowVisible](GC.Spread.Sheets.Worksheet#setrowvisible)
- [setSelection](GC.Spread.Sheets.Worksheet#setselection)
- [setSparkline](GC.Spread.Sheets.Worksheet#setsparkline)
- [setStyle](GC.Spread.Sheets.Worksheet#setstyle)
- [setStyleName](GC.Spread.Sheets.Worksheet#setstylename)
- [setTag](GC.Spread.Sheets.Worksheet#settag)
- [setText](GC.Spread.Sheets.Worksheet#settext)
- [setValue](GC.Spread.Sheets.Worksheet#setvalue)
- [showCell](GC.Spread.Sheets.Worksheet#showcell)
- [showColumn](GC.Spread.Sheets.Worksheet#showcolumn)
- [showColumnOutline](GC.Spread.Sheets.Worksheet#showcolumnoutline)
- [showRow](GC.Spread.Sheets.Worksheet#showrow)
- [showRowOutline](GC.Spread.Sheets.Worksheet#showrowoutline)
- [sortRange](GC.Spread.Sheets.Worksheet#sortrange)
- [startEdit](GC.Spread.Sheets.Worksheet#startedit)
- [suspendCalcService](GC.Spread.Sheets.Worksheet#suspendcalcservice)
- [suspendDirty](GC.Spread.Sheets.Worksheet#suspenddirty)
- [suspendEvent](GC.Spread.Sheets.Worksheet#suspendevent)
- [suspendPaint](GC.Spread.Sheets.Worksheet#suspendpaint)
- [tag](GC.Spread.Sheets.Worksheet#tag)
- [toJSON](GC.Spread.Sheets.Worksheet#tojson)
- [unbind](GC.Spread.Sheets.Worksheet#unbind)
- [unbindAll](GC.Spread.Sheets.Worksheet#unbindall)
- [ungroupSparkline](GC.Spread.Sheets.Worksheet#ungroupsparkline)
- [unprotect](GC.Spread.Sheets.Worksheet#unprotect)
- [visible](GC.Spread.Sheets.Worksheet#visible)
- [zoom](GC.Spread.Sheets.Worksheet#zoom)

## Constructors

### <a id="constructor" name="constructor"></a> constructor

• **new Worksheet**(`name`)

Represents a worksheet.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `name` | `string` | The name of the Worksheet. |

## Properties

### <a id="autogeneratecolumns" name="autogeneratecolumns"></a> autoGenerateColumns

• **autoGenerateColumns**: `boolean`

Indicates whether to generate columns automatically while binding data context.

**`example`**
```javascript
//This example sets a data source for the sheet.
 var test = [
       { "Series0": 2, "Series1": 1 },
       { "Series0": 4, "Series1": 2 },
       { "Series0": 3, "Series1": 4 }
            ];
activeSheet.autoGenerateColumns = true;
activeSheet.setDataSource(test, true);
```

___

### <a id="cellstates" name="cellstates"></a> cellStates

• **cellStates**: [`CellStateManager`](GC.Spread.Sheets.CellState.CellStateManager)

The cellState manager.

___

### <a id="charts" name="charts"></a> charts

• **charts**: [`ChartCollection`](GC.Spread.Sheets.Charts.ChartCollection)

Chart manager for the sheet.

**`example`**
```javascript
//This example shows how to add a chart.
var dataRange = "A1:D4";
var chart = activeSheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, dataRange);
```

___

### <a id="columnoutlines" name="columnoutlines"></a> columnOutlines

• **columnOutlines**: [`Outline`](GC.Spread.Sheets.Outlines.Outline)

Indicates the column range group.

___

### <a id="comments" name="comments"></a> comments

• **comments**: [`CommentManager`](GC.Spread.Sheets.Comments.CommentManager)

Comment manager for the sheet.

___

### <a id="conditionalformats" name="conditionalformats"></a> conditionalFormats

• **conditionalFormats**: [`ConditionalFormats`](GC.Spread.Sheets.ConditionalFormatting.ConditionalFormats)

Conditional format manager for the sheet.

**`example`**
```javascript
//This example creates a rule.
var style = new GC.Spread.Sheets.Style();
style.backColor = "red";
var rule = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
rule.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule);
rule.ranges([new GC.Spread.Sheets.Range(0,0,5,1)]);
rule.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.between);
rule.style(style);
rule.value1(2);
rule.value2(100);
activeSheet.conditionalFormats.addRule(rule);
activeSheet.setValue(0,0,1,3);
activeSheet.setValue(1,0,45,3);
var ruletest = activeSheet.conditionalFormats.getRules();
alert(ruletest[0].style().backColor);
```

___

### <a id="datacharts" name="datacharts"></a> dataCharts

• **dataCharts**: [`DataChartManager`](GC.Spread.Sheets.DataCharts.DataChartManager)

The datachart manager.

**`example`**
```javascript
//This example creates a datachart.
var datacharts = sheet.dataCharts;
var datachart = datacharts.add('datachart1', 250, 20, 600, 400, GC.Spread.Sheets.DataCharts.DataChartType.column);
```

___

### <a id="dataranges" name="dataranges"></a> dataRanges

• **dataRanges**: [`DataRangeManager`](GC.Spread.Sheets.DataRange.DataRangeManager)

Data range manager for the sheet.

___

### <a id="defaults" name="defaults"></a> defaults

• **defaults**: [`ISheetDefaultOption`](../interfaces/GC.Spread.Sheets.ISheetDefaultOption)

Indicates the default row height and column width of the sheet.

**`example`**
```javascript
//This example sets the default row height and column width.
activeSheet.suspendPaint();
activeSheet.defaults.rowHeight = 40;
activeSheet.defaults.colWidth = 30;
activeSheet.resumePaint();
```

___

### <a id="floatingobjects" name="floatingobjects"></a> floatingObjects

• **floatingObjects**: [`FloatingObjectCollection`](GC.Spread.Sheets.FloatingObjects.FloatingObjectCollection)

FloatingObject manager for the sheet.

**`example`**
```javascript
//This example creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
```

___

### <a id="options" name="options"></a> options

• **options**: [`IWorksheetOptions`](../interfaces/GC.Spread.Sheets.IWorksheetOptions)

Indicates the options of the sheet.

**`property`** {boolean} allowCellOverflow - Indicates whether data can overflow into adjacent empty cells.

**`property`** {boolean} showFormulas - Indicates whether display the formulas string not the formula result.

**`property`** {boolean} showZeros - Indicates whether display the 0 in cells containing zero value. Default is true.

**`property`** {string} sheetTabColor - A color string used to represent the sheet tab color, such as "red", "#FFFF00", "rgb(255,0,0)", "Accent 5", and so on.

**`property`** {string} frozenlineColor - A color string used to represent the frozen line color, such as "red", "#FFFF00", "rgb(255,0,0)", "Accent 5", and so on.

**`property`** {GC.Spread.Sheets.ClipboardPasteOptions} clipBoardOptions - The clipboard option.

**`property`** {Object} gridline - The grid line's options.

**`property`** {string} gridline.color - The grid line color

**`property`** {boolean} gridline.showVerticalGridline - Whether to show the vertical grid line.

**`property`** {boolean} gridline.showHorizontalGridline - Whether to show the horizontal grid line.

**`property`** {boolean} rowHeaderVisible - Indicates whether the row header is visible.

**`property`** {boolean} colHeaderVisible - Indicates whether the column header is visible.

**`property`** {GC.Spread.Sheets.HeaderAutoText} rowHeaderAutoText - Indicates whether the row header displays letters or numbers or is blank.

**`property`** {GC.Spread.Sheets.HeaderAutoText} colHeaderAutoText - Indicates whether the column header displays letters or numbers or is blank.

**`property`** {number} rowHeaderAutoTextIndex - Specifies which row header column displays the automatic text when there are multiple row header columns.

**`property`** {number} colHeaderAutoTextIndex - Specifies which column header row displays the automatic text when there are multiple column header rows.

**`property`** {boolean} isProtected - Indicates whether cells on this sheet that are marked as protected cannot be edited.

**`property`** {Object} protectionOptions - A value that indicates the elements that you want users to be able to change.

**`property`** {boolean} [protectionOptions.allowSelectLockedCells] - True or undefined if the user can select locked cells.

**`property`** {boolean} [protectionOptions.allowSelectUnlockedCells] - True or undefined if the user can select unlocked cells.

**`property`** {boolean} [protectionOptions.allowSort] - True if the user can sort ranges.

**`property`** {boolean} [protectionOptions.allowFilter] - True if the user can filter ranges.

**`property`** {boolean} [protectionOptions.allowEditObjects] - True if the user can edit floating objects.

**`property`** {boolean} [protectionOptions.allowResizeRows] - True if the user can resize rows.

**`property`** {boolean} [protectionOptions.allowResizeColumns] - True if the user can resize columns.

**`property`** {boolean} [protectionOptions.allowDragInsertRows] - True if the user can drag to insert rows.

**`property`** {boolean} [protectionOptions.allowDragInsertColumns] - True if the user can drag to insert columns.

**`property`** {boolean} [protectionOptions.allowInsertRows] - True if the user can insert rows.

**`property`** {boolean} [protectionOptions.allowInsertColumns] - True if the user can insert columns.

**`property`** {boolean} [protectionOptions.allowDeleteRows] - True if the user can delete rows.

**`property`** {boolean} [protectionOptions.allowDeleteColumns] - True if the user can delete columns.

**`property`** {boolean} [protectionOptions.allowOutlineColumns] - True if the user can expand or collapse the column groups.

**`property`** {boolean} [protectionOptions.allowOutlineRows] - True if the user can expand or collapse the row groups.

**`property`** {string} selectionBackColor - The selection's background color for the sheet.

**`property`** {string} selectionBorderColor -  The selection's border color for the sheet.

**`property`** {Object} sheetAreaOffset - The sheetAreaOffset's options.

**`property`** {number} [sheetAreaOffset.left] - The offset left of sheet from host.

**`property`** {number} [sheetAreaOffset.top] - The offset top of sheet from host.

**`property`** {boolean} keepUnknownFormulas - Indicates whether the unknown formulas could be included in sheet json data.

**`property`** {GC.Spread.Sheets.IAddRowButtonOption} [addRowButtonOption] - The add row button's options.

**`property`** {GC.Spread.Sheets.IAddColumnButtonOption} [addColumnButtonOption] - The add column button's options.

**`property`** {boolean} rightToLeft - Indicates whether the sheet is rendered from right to left.

**`property`** {string} backgroundImage - Indicates the URL of the background image.

**`example`**
```javascript
sheet.setRowCount(2,GC.Spread.Sheets.SheetArea.colHeader);
sheet.setColumnCount(2,GC.Spread.Sheets.SheetArea.rowHeader);
sheet.setValue(0, 2,"Column",GC.Spread.Sheets.SheetArea.colHeader);
sheet.options.colHeaderAutoTextIndex = 1;
sheet.options.colHeaderAutoText = GC.Spread.Sheets.HeaderAutoText.numbers;
```

___

### <a id="outlinecolumn" name="outlinecolumn"></a> outlineColumn

• **outlineColumn**: [`OutlineColumn`](GC.Spread.Sheets.OutlineColumn.OutlineColumn)

Gets the outline column for the sheet.

**`returns`**

___

### <a id="pictures" name="pictures"></a> pictures

• **pictures**: [`FloatingObjectCollection`](GC.Spread.Sheets.FloatingObjects.FloatingObjectCollection)

Picture manager for the sheet.

**`deprecated`** since version 15.2.0, please use 'sheet.shapes' instead

**`example`**
```javascript
//This example adds a picture.
activeSheet.pictures.add("f2","Event.png",2,2,10,10);
var picture = activeSheet.pictures.get("f2");
picture.pictureStretch(GC.Spread.Sheets.ImageLayout.center);
picture.backColor("Blue");
picture.borderWidth(2);
picture.borderColor("Red");
picture.borderStyle("dotted");
picture.borderRadius(5);
```

___

### <a id="pivottables" name="pivottables"></a> pivotTables

• **pivotTables**: [`PivotTableManager`](GC.Spread.Sheets.PivotTableManager)

The pivot table manager.

**`example`**
```javascript
//This example creates a pivot table.
var pivotTableManager = sheet.pivotTables;
var sourceData = [["Date","Buyer","Type","Amount"],["01-Jan","Mom","Fuel",74],["15-Jan","Mom","Food",235],["17-Jan","Dad","Sports",20],["21-Jan","Kelly","Books",125],["02-Feb","Mom","Food",235],["20-Feb","Kelly","Music",20],["25-Feb","Kelly","Tickets",125]];
var options = {showRowHeader: true, showColumnHeader: true};
var myPivotTable = pivotTableManager.add("pivotTable_1", sourceData , 1, 1, GC.Spread.Pivot.PivotTableLayoutType.tabular, GC.Spread.Pivot.PivotTableThemes.medium2, option);
```

___

### <a id="rowoutlines" name="rowoutlines"></a> rowOutlines

• **rowOutlines**: [`Outline`](GC.Spread.Sheets.Outlines.Outline)

Indicates the row range group.

___

### <a id="shapes" name="shapes"></a> shapes

• **shapes**: [`ShapeCollection`](GC.Spread.Sheets.Shapes.ShapeCollection)

Shape manager for the sheet.

**`example`**
```javascript
//This example shows how to add a shape.
var shape = activeSheet.shapes.add("shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 50, 100, 150);
```

___

### <a id="slicers" name="slicers"></a> slicers

• **slicers**: [`SlicerCollection`](GC.Spread.Sheets.Slicers.SlicerCollection)

The slicer manager.

**`example`**
```javascript
//This example adds a slicer.
//create a table
datas = [
    ["1", "NewYork", "1968/6/8", "80", "180"],
    ["4", "NewYork", "1972/7/3", "72", "168"],
    ["4", "NewYork", "1964/3/2", "71", "179"],
    ["5", "Washington", "1972/8/8","80", "171"],
    ["6", "Washington", "1986/2/2", "89", "161"],
    ["7", "Washington", "2012/2/15", "71", "240"]];
var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
table.setColumnName(0, dataColumns[0]);
table.setColumnName(1, dataColumns[1]);
table.setColumnName(2, dataColumns[2]);
table.setColumnName(3, dataColumns[3]);
table.setColumnName(4, dataColumns[4]);
var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.light4();
//add a slicer to the sheet and return the slicer instance.
var slicer = activeSheet.slicers.add("slicer1",table.name(),"Height");
 //change the slicer properties.
slicer.position(new GC.Spread.Sheets.Point(100, 200));
slicer.disableResizingAndMoving(true);
slicer.style(style1);
```

___

### <a id="tables" name="tables"></a> tables

• **tables**: [`TableManager`](GC.Spread.Sheets.Tables.TableManager)

The table manager.

**`example`**
```javascript
//This example creates a table.
activeSheet.tables.add("Table1", 0, 0, 3, 3, GC.Spread.Sheets.Tables.TableThemes.dark1);
activeSheet.getCell(0,0).text("Name");
activeSheet.getCell(0,1).text("Value");
activeSheet.getCell(0,2).text("T/F");
activeSheet.getCell(1,0).text("AW");
activeSheet.getCell(1,1).text("5");
activeSheet.getCell(1,2).text("T");
```

## Methods

### <a id="addcolumns" name="addcolumns"></a> addColumns

▸ **addColumns**(`col`, `count`, `sheetArea?`): `void`

Adds the column or columns to the data model at the specified index.

**`example`**
```javascript
//This example adds columns.
sheet.setValue(0, 0, "value");
sheet.addRows(0, 2);
sheet.addColumns(0, 2);
sheet.setRowHeight(0, 50.0,GC.Spread.Sheets.SheetArea.viewport);
sheet.setColumnWidth(0, 150.0,GC.Spread.Sheets.SheetArea.viewport);
sheet.getRange(0, -1, 1, -1,GC.Spread.Sheets.SheetArea.viewport).backColor("Gray");
sheet.getRange(-1, 0, -1, 1,GC.Spread.Sheets.SheetArea.viewport).backColor ("Brown");
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `col` | `number` | Column index at which to add the new columns. |
| `count` | `number` | The number of columns to add. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`void`

___

### <a id="addcustomfunction" name="addcustomfunction"></a> addCustomFunction

▸ **addCustomFunction**(`fn`): `void`

Adds a custom function.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `fn` | [`Function`](GC.Spread.CalcEngine.Functions.Function) | The function to add. |

#### Returns

`void`

___

### <a id="addcustomname" name="addcustomname"></a> addCustomName

▸ **addCustomName**(`name`, `formula`, `baseRow`, `baseCol`, `comment?`, `isReadOnly?`): `void`

Adds a custom name.

**`example`**
```javascript
//This example creates custom names.
sheet.setValue(0, 0, 1);
sheet.setValue(0, 1, 2);
sheet.setValue(0, 2, 3);
sheet.addCustomName("customName1","=12", 0, 0);
sheet.addCustomName("customName2","Average(20,45)", 0, 0);
sheet.addCustomName("customName3", "=$A$1:$C$1", 0, 0);
sheet.setFormula(1, 0, "customName1");
sheet.setFormula(1, 1, "customName2");
sheet.setFormula(1, 2, "sum(customName3)");
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `name` | `string` | The custom name. |
| `formula` | `string` | The formula. |
| `baseRow` | `number` | The row index. |
| `baseCol` | `number` | The column index. |
| `comment?` | `string` | - |
| `isReadOnly?` | `boolean` | - |

#### Returns

`void`

___

### <a id="addnamedstyle" name="addnamedstyle"></a> addNamedStyle

▸ **addNamedStyle**(`style`): `void`

Adds a style to the Worksheet named styles collection.

**`example`**
```javascript
var namedStyle = new GC.Spread.Sheets.Style();
namedStyle.name = "style1";
namedStyle.backColor = "green";
activeSheet.addNamedStyle(namedStyle);
activeSheet.setStyleName(1, 1, "style1"); // cell(1,1)'s backColor is  green.
activeSheet.setStyleName(2, 1, "style1");
var style = activeSheet.getNamedStyle("style1");
style.foreColor = "red";    // the namedStyle's foreColor is red.
activeSheet.repaint(); // the foreColor of the cell(1,1) and cell(2,1) is red.
activeSheet.getCell(1,1).value("test");
$("#button1").click(function () {
activeSheet.removeNamedStyle("style1");
    });
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `style` | [`Style`](GC.Spread.Sheets.Style) | The style to be added. |

#### Returns

`void`

___

### <a id="addrows" name="addrows"></a> addRows

▸ **addRows**(`row`, `count`, `sheetArea?`): `void`

Adds rows in this worksheet.

**`example`**
```javascript
//This example adds rows.
sheet.setValue(0, 0, "value");
sheet.addRows(0, 2);
sheet.addColumns(0, 2);
sheet.setRowHeight(0, 50.0,GC.Spread.Sheets.SheetArea.viewport);
sheet.setColumnWidth(0, 150.0,GC.Spread.Sheets.SheetArea.viewport);
sheet.getRange(0, -1, 1, -1,GC.Spread.Sheets.SheetArea.viewport).backColor("Gray");
sheet.getRange(-1, 0, -1, 1,GC.Spread.Sheets.SheetArea.viewport).backColor ("Brown");
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The index of the starting row. |
| `count` | `number` | The number of rows to add. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`void`

___

### <a id="addselection" name="addselection"></a> addSelection

▸ **addSelection**(`row`, `column`, `rowCount`, `columnCount`): `void`

Adds a cell or cells to the selection.

**`example`**
```javascript
//This example adds a selection and uses the selection in a rule.
sheet.setValue(0,0, 1,3);
sheet.setValue(1,0, 50,3);
sheet.setValue(2,0, 100,3);
sheet.setValue(3,0, 2,3);
sheet.setValue(4,0, 60,3);
sheet.setValue(5,0, 90,3);
sheet.setValue(6,0, 3,3);
sheet.setValue(7,0, 40,3);
sheet.setValue(8,0, 70,3);
sheet.setValue(9,0, 5,3);
sheet.setValue(10,0, 35,3);
sheet.addSelection(0,0,11,1);
sheet.conditionalFormats.add3ScaleRule(1, 10, "red", 0, 50, "blue",2, 100, "yellow", sheet.getSelections());
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index of the first cell to add. |
| `column` | `number` | The column index of the first cell to add. |
| `rowCount` | `number` | The number of rows to add. |
| `columnCount` | `number` | The number of columns to add. |

#### Returns

`void`

___

### <a id="addspan" name="addspan"></a> addSpan

▸ **addSpan**(`row`, `col`, `rowCount`, `colCount`, `sheetArea?`): `void`

Adds a span of cells to this sheet in the specified sheet area.

**`example`**
```javascript
//This example creates cell spans.
sheet.setRowCount(4,1);
sheet.setColumnCount(4,2);
sheet.addSpan(0,0,3,3,GC.Spread.Sheets.SheetArea.colHeader);
sheet.addSpan(0,0,3,3,GC.Spread.Sheets.SheetArea.rowHeader);
sheet.addSpan(0,0,3,3,GC.Spread.Sheets.SheetArea.viewport);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index of the cell at which to start the span. |
| `col` | `number` | - |
| `rowCount` | `number` | The number of rows to span. |
| `colCount` | `number` | The number of columns to span. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`void`

___

### <a id="addspans" name="addspans"></a> addSpans

▸ **addSpans**(`spans`, `sheetArea?`): `void`

Adds a lot of spans to this sheet in the specified sheet area.

**`example`**
```javascript
//This example creates cell spans.
sheet.addSpans([{row: 0, col: 0, rowCount: 2, colCount: 2}, {row: 3, col: 0, rowCount: 3, colCount: 3}, {row: 7, col: 0, rowCount: 4, colCount: 4}], GC.Spread.Sheets.SheetArea.viewport);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `spans` | [`IRange`](../interfaces/GC.Spread.Sheets.IRange)[] | The span ranges, each range contains row, col, rowCount, colCount. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`void`

___

### <a id="autofitcolumn" name="autofitcolumn"></a> autoFitColumn

▸ **autoFitColumn**(`column`): `void`

Automatically fits the viewport column.

**`property`** {number} column The column index.

**`example`**
```javascript
//This example sets the column width based on the text.
activeSheet.setValue(0, 1, "testing");
activeSheet.autoFitColumn(1);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `column` | `number` |

#### Returns

`void`

___

### <a id="autofitrow" name="autofitrow"></a> autoFitRow

▸ **autoFitRow**(`row`): `void`

Automatically fits the viewport row.

**`property`** {number} row The row index.

**`example`**
```javascript
//This example sets the row height based on the text.
activeSheet.setValue(0, 1, "testing\r\nmultiple\r\nlines");
activeSheet.getCell(0,1).wordWrap(true);
activeSheet.autoFitRow(0);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `row` | `number` |

#### Returns

`void`

___

### <a id="automerge" name="automerge"></a> autoMerge

▸ **autoMerge**(`range`, `direction?`, `mode?`, `sheetArea?`, `selectionMode?`): [`IRangeInfo`](../interfaces/GC.Spread.Sheets.AutoMerge.IRangeInfo)[]

Applies auto merge for a range.

**`example`**
```javascript
var range = new GC.Spread.Sheets.Range(-1, 0, -1, 1);
sheet.autoMerge(range);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `range` | [`Range`](GC.Spread.Sheets.Range) | The auto merge range. |
| `direction?` | [`AutoMergeDirection`](../enums/GC.Spread.Sheets.AutoMerge.AutoMergeDirection) | The auto merge direction. If this parameter is not provided, it defaults to `column`. Specially, if the direction is `none`, the auto merge for the range will be canceled. |
| `mode?` | [`AutoMergeMode`](../enums/GC.Spread.Sheets.AutoMerge.AutoMergeMode) | The auto merge mode. If this parameter is not provided, it defaults to `free`. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | The sheet area of the auto merge range. If this parameter is not provided, it defaults to `viewport`. |
| `selectionMode?` | [`SelectionMode`](../enums/GC.Spread.Sheets.AutoMerge.SelectionMode) | The auto merge selection mode. If this parameter is not provided, it defaults to `source`. |

#### Returns

[`IRangeInfo`](../interfaces/GC.Spread.Sheets.AutoMerge.IRangeInfo)[]

If no parameter is provided, returns all auto merge range infos of current worksheet. Each range info contains range, direction, mode, sheetArea, selection mode.

___

### <a id="backgroundimage" name="backgroundimage"></a> backgroundImage

▸ **backgroundImage**(`src?`): ``null`` \| `string`

Get or set the background image of the worksheet, if there is no parameters, indicates return the background image of the worksheet.

**`example`**
```javascript
activeSheet.backgroundImage('./image/background.jpg');
let imageUrl = activeSheet.backgroundImage();
alert(imageUrl);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `src?` | `string` | the url of the background image. |

#### Returns

``null`` \| `string`

Returns url of the background image of the worksheet.

___

### <a id="bind" name="bind"></a> bind

▸ **bind**(`type`, `data?`, `fn?`): `void`

Binds an event to the sheet.

**`example`**
```javascript
//This example binds events.
sheet.bind(GC.Spread.Sheets.Events.LeftColumnChanged,function(event,data)
  {
    var str = "----------------------------------------\n";
    var title = "Event [LeftColumnChanged ] Fired";
    str = str.substr(0, 4) + title + str.substr(4 + title.length);
    if (typeof data == "object") {
        for (var key in data) {
            str += key + " : " + data[key] + "\n";
          }
      } else {
        str += data + "\n";
      }
      alert(str);
  });
sheet.bind(GC.Spread.Sheets.Events.TopRowChanged,function(event,data)
  {
        var str = "----------------------------------------\n";
        var title = "Event [TopRowChanged] Fired";
        str = str.substr(0, 4) + title + str.substr(4 + title.length);
        if (typeof data == "object") {
            for (var key in data) {
                str += key + " : " + data[key] + "\n";
            }
        } else {
            str += data + "\n";
        }
        alert(str);
    });
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `type` | `string` | The event type. |
| `data?` | `any` | Optional. Specifies additional data to pass along to the function. |
| `fn?` | `Function` | Specifies the function to run when the event occurs. |

#### Returns

`void`

___

### <a id="bindcolumn" name="bindcolumn"></a> bindColumn

▸ **bindColumn**(`index`, `column`): `void`

Binds the column using the specified data field.

**`example`**
```javascript
var test = [
{"Series0":2,"Series1":1},
{"Series0":4,"Series1":2},
{"Series0":3,"Series1":4}
];
sheet.setDataSource(test);
sheet.bindColumn(1,"Series0");
sheet.bindColumn(0,"Series1");
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `index` | `number` | The column index. |
| `column` | `string` \| [`IColumn`](../interfaces/GC.Spread.Sheets.IColumn) | Column information with data field. If its type is string, it is regarded as name. |

#### Returns

`void`

___

### <a id="bindcolumns" name="bindcolumns"></a> bindColumns

▸ **bindColumns**(`columns`): `void`

Binds the columns using the specified data fields.

**`example`**
```javascript
var datasource = [
                 { name: "Alice", age: 27, birthday: "1985/08/31", position: "Beijing", isMarried: false},
                 { name: "Aimee", age: 28, birthday: "1984/07/31", position: "Xi'An", isMarried: true},
                 { name: "Charles", age: 29, birthday: "1983/03/31", position: "ShangHai", isMarried: true},
            ];
var colInfos = [
                { name: "name", displayName: "Name", size: 70, pageBread: false},
                { name: "age", displayName: "Age", size: 40, resizable: false },
                { name: "birthday", displayName: "Birthday", formatter: "d/M/yy", size: 120 },
                { name: "position", displayName: "Position", size: 50, visible: true, value: function (item){
			             return 'China ' + item['position'];
		           }},
                { name: "isMarried", displayName: "IsMarried", size: 50, visible: true, cellType: new GC.Spread.Sheets.CellTypes.CheckBox()}
            ];
activeSheet.autoGenerateColumns = true;
activeSheet.setDataSource(datasource);
activeSheet.bindColumns(colInfos);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `columns` | [`IColumn`](../interfaces/GC.Spread.Sheets.IColumn)[] | The array of column information with data fields. If an item's type is string, the item is regarded as name. |

#### Returns

`void`

___

### <a id="clear" name="clear"></a> clear

▸ **clear**(`row`, `column`, `rowCount`, `colCount`, `area`, `storageType`): `void`

Clears the specified area.

**`example`**
```javascript
//This example clears the data from the specified range.
activeSheet.getCell(0,0).value("A1");
activeSheet.clear(0,0,3,3,GC.Spread.Sheets.SheetArea.viewport,GC.Spread.Sheets.StorageType.data);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The start row index. |
| `column` | `number` | The start column index. |
| `rowCount` | `number` | The number of rows to clear. |
| `colCount` | `number` | - |
| `area` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | The area to clear. |
| `storageType` | [`StorageType`](../enums/GC.Spread.Sheets.StorageType) | The clear type. |

#### Returns

`void`

___

### <a id="clearcustomfunctions" name="clearcustomfunctions"></a> clearCustomFunctions

▸ **clearCustomFunctions**(): `void`

Clears all custom functions.

**`example`**
```javascript
//This example clears the custom functions from the active sheet.
activeSheet.clearCustomFunctions();
```

#### Returns

`void`

___

### <a id="clearcustomnames" name="clearcustomnames"></a> clearCustomNames

▸ **clearCustomNames**(): `void`

Clears custom names.

**`example`**
```javascript
//This example creates custom names and then clears them.
activeSheet.setValue(0, 0, 1);
activeSheet.setValue(0, 1, 2);
activeSheet.setValue(0, 2, 3);
activeSheet.addCustomName("customName1","=12", 0, 0);
activeSheet.addCustomName("customName2","Average(20,45)", 0, 0);
activeSheet.addCustomName("customName3", "=$A$1:$C$1", 0, 0);
activeSheet.setFormula(1, 0, "customName1");
activeSheet.setFormula(1, 1, "customName2");
activeSheet.setFormula(1, 2, "sum(customName3)");
activeSheet.clearCustomNames();
```

#### Returns

`void`

___

### <a id="clearpendingchanges" name="clearpendingchanges"></a> clearPendingChanges

▸ **clearPendingChanges**(`clearChangeInfo?`): `void`

Clears the dirty, insert, and delete status from the current worksheet.

**`example`**
```javascript
sheet.clearPendingChanges({clearType: 1, row: 0, rowCount: 3, col: 0, colCount: 4});
sheet.clearPendingChanges({clearType: 2, row: 0, rowCount: 3, col: -1});
sheet.clearPendingChanges({clearType: 4, row: 0, rowCount: 10, col: -1});
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `clearChangeInfo?` | [`IClearChangeInfo`](../interfaces/GC.Spread.Sheets.IClearChangeInfo) |

#### Returns

`void`

___

### <a id="clearselection" name="clearselection"></a> clearSelection

▸ **clearSelection**(): `void`

Clears the selection.

**`example`**
```javascript
//This example clears the selection.
sheet.addSelection(4, 0, 2, 2);
sheet.clearSelection();
```

#### Returns

`void`

___

### <a id="copyto" name="copyto"></a> copyTo

▸ **copyTo**(`fromRow`, `fromColumn`, `toRow`, `toColumn`, `rowCount`, `columnCount`, `option`): `void`

Copies data from one range to another.

**`example`**
```javascript
//This example copies data to the specified location.
activeSheet.getCell(0,0).value("1");
activeSheet.copyTo(0,0,1,1,2,2,GC.Spread.Sheets.CopyToOptions.value);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `fromRow` | `number` | The source row. |
| `fromColumn` | `number` | The source column. |
| `toRow` | `number` | The target row. |
| `toColumn` | `number` | The target column. |
| `rowCount` | `number` | The row count. |
| `columnCount` | `number` | The column count. |
| `option` | [`CopyToOptions`](../enums/GC.Spread.Sheets.CopyToOptions) | The copy option. |

#### Returns

`void`

___

### <a id="currenttheme" name="currenttheme"></a> currentTheme

▸ **currentTheme**(`value?`): `any`

Gets or sets the current theme for the sheet.

**`example`**
```javascript
//This example sets a theme.
sheet.currentTheme("Civic");
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `value?` | `string` \| [`Theme`](GC.Spread.Sheets.Theme) |

#### Returns

`any`

If no value is set, returns the current theme; otherwise, returns the worksheet.

___

### <a id="deletecolumns" name="deletecolumns"></a> deleteColumns

▸ **deleteColumns**(`col`, `count`, `sheetArea?`): `void`

Deletes the columns in this sheet at the specified index.

**`example`**
```javascript
activeSheet.getCell(0,0).value("A1");
activeSheet.getCell(0,4).value("Test")
activeSheet.deleteColumns(0,2);
activeSheet.deleteRows(3,1);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `col` | `number` | The index of the first column to delete. |
| `count` | `number` | The number of columns to delete. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`void`

___

### <a id="deleterows" name="deleterows"></a> deleteRows

▸ **deleteRows**(`row`, `count`, `sheetArea?`): `void`

Deletes the rows in this worksheet at the specified index.

**`example`**
```javascript
activeSheet.getCell(0,0).value("A1");
activeSheet.getCell(0,4).value("Test")
activeSheet.deleteColumns(0,2);
activeSheet.deleteRows(3,1);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The index of the first row to delete. |
| `count` | `number` | The number of rows to delete. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`void`

___

### <a id="editorstatus" name="editorstatus"></a> editorStatus

▸ **editorStatus**(): [`EditorStatus`](../enums/GC.Spread.Sheets.EditorStatus)

Returns the editor's status.

#### Returns

[`EditorStatus`](../enums/GC.Spread.Sheets.EditorStatus)

The editor status.

___

### <a id="endedit" name="endedit"></a> endEdit

▸ **endEdit**(`ignoreValueChange?`): `boolean`

Stops editing the active cell.

**`example`**
```javascript
//This example removes the text "123" when typing in a cell.
activeSheet.bind(GC.Spread.Sheets.Events.EditChange, function (sender,args) {
                if (args.editingText === "123") {
                    activeSheet.endEdit(true);
               }
            });
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `ignoreValueChange?` | `boolean` | If set to `true`, does not apply the edited text to the cell. |

#### Returns

`boolean`

`true` when able to stop cell editing successfully; otherwise, `false`.

___

### <a id="fillauto" name="fillauto"></a> fillAuto

▸ **fillAuto**(`startRange`, `wholeRange`, `options`): `void`

Fills the specified range automatically.

**`example`**
```javascript
activeSheet.setValue(0, 0, 5);
var start = new GC.Spread.Sheets.Range(0, 0, 1, 1);
var r3 = new GC.Spread.Sheets.Range(0, 0, 4, 1);
activeSheet.fillAuto(start,r3, {fillType:GC.Spread.Sheets.Fill.FillType.auto, series:GC.Spread.Sheets.Fill.FillSeries.column, direction:GC.Spread.Sheets.Fill.FillDirection.down});
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `startRange` | [`Range`](GC.Spread.Sheets.Range) | The fill start range. |
| `wholeRange` | [`Range`](GC.Spread.Sheets.Range) | The entire range to fill. |
| `options` | [`IFillOptions`](../interfaces/GC.Spread.Sheets.Fill.IFillOptions) | The range fill information. |

#### Returns

`void`

___

### <a id="fromjson" name="fromjson"></a> fromJSON

▸ **fromJSON**(`sheetSettings`): `void`

Loads the object state from the specified JSON string.

**`example`**
```javascript
//This example uses the fromJSON method.
activeSheet.getCell(0,0).value(123);
var jsonStr = null;
//export
jsonStr = JSON.stringify(activeSheet.toJSON());
//import
activeSheet.fromJSON(JSON.parse(jsonStr));
alert(jsonStr);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `sheetSettings` | `Object` | The sheet data from deserialization. |

#### Returns

`void`

___

### <a id="frozencolumncount" name="frozencolumncount"></a> frozenColumnCount

▸ **frozenColumnCount**(`colCount?`, `leftCol?`): `any`

Gets or sets the number of frozen columns of the sheet.

**`example`**
```javascript
sheet.frozenColumnCount(30, 20);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `colCount?` | `number` |
| `leftCol?` | `number` |

#### Returns

`any`

If no value is set, returns the number of frozen columns; otherwise, returns the worksheet.

___

### <a id="frozenrowcount" name="frozenrowcount"></a> frozenRowCount

▸ **frozenRowCount**(`rowCount?`, `topRow?`): `any`

Gets or sets the number of frozen rows of the sheet.

**`example`**
```javascript
sheet.frozenRowCount(60, 50);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `rowCount?` | `number` |
| `topRow?` | `number` |

#### Returns

`any`

If no value is set, returns the number of frozen rows; otherwise, returns the worksheet.

___

### <a id="frozentrailingcolumncount" name="frozentrailingcolumncount"></a> frozenTrailingColumnCount

▸ **frozenTrailingColumnCount**(`colCount?`, `stickToEdge?`): `any`

Gets or sets the number of trailing frozen columns of the sheet.

**`example`**
```javascript
sheet.frozenTrailingColumnCount(1, false);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `colCount?` | `number` |
| `stickToEdge?` | `boolean` |

#### Returns

`any`

If no value is set, returns the number of trailing frozen columns; otherwise, returns the worksheet.

___

### <a id="frozentrailingrowcount" name="frozentrailingrowcount"></a> frozenTrailingRowCount

▸ **frozenTrailingRowCount**(`rowCount?`, `stickToEdge?`): `any`

Gets or sets the number of trailing frozen rows of the sheet.

**`example`**
```javascript
sheet.frozenTrailingRowCount(1, false);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `rowCount?` | `number` |
| `stickToEdge?` | `boolean` |

#### Returns

`any`

If no value is set, returns the number of trailing frozen rows; otherwise, returns the worksheet.

___

### <a id="getactivecolumnindex" name="getactivecolumnindex"></a> getActiveColumnIndex

▸ **getActiveColumnIndex**(): `number`

Gets the active column index for this sheet.

**`example`**
```javascript
//This example gets the active column.
sheet.setActiveCell(5,5);
alert(sheet.getActiveColumnIndex());
alert(sheet.getActiveRowIndex());
spread.bind(GC.Spread.Sheets.Events.EnterCell, function (event, data) {
    alert(data.col);
    alert(data.row);
  });
spread.bind(GC.Spread.Sheets.Events.LeaveCell, function (event, data) {
    alert(data.col);
    alert(data.row);
  });
```

#### Returns

`number`

The column index of the active cell.

___

### <a id="getactiverowindex" name="getactiverowindex"></a> getActiveRowIndex

▸ **getActiveRowIndex**(): `number`

Gets the active row index for this sheet.

**`example`**
```javascript
//This example gets the active row.
sheet.setActiveCell(5,5);
alert(sheet.getActiveColumnIndex());
alert(sheet.getActiveRowIndex());
spread.bind(GC.Spread.Sheets.Events.EnterCell, function (event, data) {
    alert(data.col);
    alert(data.row);
  });
spread.bind(GC.Spread.Sheets.Events.LeaveCell, function (event, data) {
    alert(data.col);
    alert(data.row);
  });
```

#### Returns

`number`

The row index of the active cell.

___

### <a id="getactualstyle" name="getactualstyle"></a> getActualStyle

▸ **getActualStyle**(`row`, `column`, `sheetArea?`, `sheetStyleOnly?`): [`Style`](GC.Spread.Sheets.Style)

Gets the actual style information for a specified cell in the specified sheet area.

**`example`**
```javascript
//This example uses the getActualStyle method.
var style = new GC.Spread.Sheets.Style();
style.backColor = "red";
style.borderLeft =new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
style.borderTop = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
style.borderRight = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
style.borderBottom = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
var cstyle = activeSheet.getActualStyle(1,1,GC.Spread.Sheets.SheetArea.viewport, true);
alert(cstyle.backColor);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `column` | `number` | The column index. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |
| `sheetStyleOnly?` | `boolean` | - |

#### Returns

[`Style`](GC.Spread.Sheets.Style)

Returns the cell style of the specified cell.

___

### <a id="getalttext" name="getalttext"></a> getAltText

▸ **getAltText**(`row`, `col`, `sheetArea?`): `any`

Gets the alternative text from the specified cell in the specified sheet area.

**`example`**
```javascript
var SpreadIcon = {
    FolderOpen: '\ue685',
    InfoFilled: '\ue718',
    Library: '\ue69d',
    NotebookFilled: '\uD800\uDC0F',
    Browse: '\ue626'
};
activeSheet.setValue(1, 1, SpreadIcon.FolderOpen);
activeSheet.setAltText(1, 1, "Folder Open Icon");
alert(activeSheet.getAltText(1, 1));
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | The sheet area. If this parameter is not provided, it defaults to `viewport`. |

#### Returns

`any`

Returns the alternative text of the cell.

___

### <a id="getarray" name="getarray"></a> getArray

▸ **getArray**(`row`, `column`, `rowCount`, `columnCount`, `getFormula?`): `any`[]

Gets an object array from a specified range of cells.

**`example`**
```javascript
//This example uses the getArray method.
//set value
var array = [[1,2,3],[4,5],[6,7,8,9]];
activeSheet.setArray(1, 2, array);
//set formula
var array = [["=1+1","=2+2","=3+3"],["=4+4","=5+5"],["=6+6","=7+7","=8+8","=9+9"]];
activeSheet.setArray(1, 2, array, true);
//get value
var newArray = activeSheet.getArray(1, 2, 3, 4);
//getformula
var newArray = activeSheet.getArray(1, 2, 3, 4, true);
//alert(newArray[0]);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `column` | `number` | The column index. |
| `rowCount` | `number` | The row count. |
| `columnCount` | `number` | - |
| `getFormula?` | `boolean` | If `true`, return formulas; otherwise, return values. |

#### Returns

`any`[]

The object array from the specified range of cells.

___

### <a id="getbindingpath" name="getbindingpath"></a> getBindingPath

▸ **getBindingPath**(`row`, `col`): `string`

Gets the binding path of cell-level binding from the specified cell in the specified sheet area.

**`example`**
```javascript
//This example uses the getBindingPath method.
var person = {name: "Wang feng", age: 25, address: {postcode: "710075"}};
var source = new GC.Spread.Sheets.Bindings.CellBindingSource(person);
activeSheet.setBindingPath(0, 0, "name");
activeSheet.setBindingPath(1, 1, "age");
activeSheet.setBindingPath(3, 3, "address.postcode");
activeSheet.setDataSource(source);
alert(activeSheet.getBindingPath(0, 0, GC.Spread.Sheets.SheetArea.viewport));
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |

#### Returns

`string`

Returns the binding path of the cell for cell-level binding.

___

### <a id="getcell" name="getcell"></a> getCell

▸ **getCell**(`row`, `col`, `sheetArea?`): [`CellRange`](GC.Spread.Sheets.CellRange)

Gets the specified cell in the specified sheet area.

**`example`**
```javascript
//This example gets the cell.
activeSheet.getCell(1,1).text("cell object");
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | The sheet area. If this parameter is not given, it defaults to`viewport`. |

#### Returns

[`CellRange`](GC.Spread.Sheets.CellRange)

The cell.

___

### <a id="getcellrect" name="getcellrect"></a> getCellRect

▸ **getCellRect**(`row`, `col`, `rowViewportIndex?`, `colViewportIndex?`): [`Rect`](GC.Spread.Sheets.Rect)

Gets the rectangle of the cell.

**`example`**
```javascript
//This example uses the getCellRect method.
activeSheet.bind(GC.Spread.Sheets.Events.CellClick, function (e, info) {
               if (info.sheetArea === GC.Spread.Sheets.SheetArea.viewport) {
                   alert("Clicked cell index (" + info.row + "," + info.col + ")");
                   //Acquire the coordinate information of regular cells which exist at the specified index position
                   var cellRect = activeSheet.getCellRect(info.row, info.col);
                   alert("X coordinate:" + cellRect.x);
                   alert("Y coordinate:" + cellRect.y);
                   alert("Cell width:" + cellRect.width);
                   alert("Cell height:" + cellRect.height);
               }
           });
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `rowViewportIndex?` | `number` | - |
| `colViewportIndex?` | `number` | - |

#### Returns

[`Rect`](GC.Spread.Sheets.Rect)

Object that contains the size and location of the cell rectangle.

___

### <a id="getcelltype" name="getcelltype"></a> getCellType

▸ **getCellType**(`row`, `col`, `sheetArea?`): [`Base`](GC.Spread.Sheets.CellTypes.Base)

Gets the cell type.

**`example`**
```javascript
//This example gets the cell type.
var cellType = new GC.Spread.Sheets.CellTypes.Button();
cellType.buttonBackColor("#FFFF00");
cellType.text("this is a button");
activeSheet.getCell(0, 2).cellType(cellType);
var cellType = activeSheet.getCellType(0,2,GC.Spread.Sheets.SheetArea.viewport)
if (cellType instanceof GC.Spread.Sheets.CellTypes.Button) {
      alert("This is a ButtonCellType");
}
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

[`Base`](GC.Spread.Sheets.CellTypes.Base)

Returns the cell type for the specified cell.

___

### <a id="getcolumncount" name="getcolumncount"></a> getColumnCount

▸ **getColumnCount**(`sheetArea?`): `number`

Gets the column count in the specified sheet area.

**`example`**
```javascript
//This example gets the number of columns.
var count = activeSheet.getColumnCount(GC.Spread.Sheets.SheetArea.viewport);
alert(count);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) |

#### Returns

`number`

The number of columns.

___

### <a id="getcolumnpagebreak" name="getcolumnpagebreak"></a> getColumnPageBreak

▸ **getColumnPageBreak**(`column`): `boolean`

Gets whether a forced page break is inserted before the specified column on this sheet when printing.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `column` | `number` | The column index. |

#### Returns

`boolean`

`true` if a forced page break is inserted before the specified column; otherwise, `false`.

___

### <a id="getcolumnresizable" name="getcolumnresizable"></a> getColumnResizable

▸ **getColumnResizable**(`col`, `sheetArea?`): `boolean`

Gets a value that indicates whether the user can resize a specified column in the specified sheet area.

**`example`**
```javascript
//This example gets whether the column is resizable.
sheet.setRowCount(10);
sheet.setColumnCount(7);
sheet.setValue(0, 0,"Western");
sheet.setValue(0, 1,"Western");
sheet.setValue(0, 2,"Western");
sheet.setValue(1, 0,"A");
sheet.setValue(1, 1,"B");
sheet.setValue(1, 2,"C");
sheet.setColumnResizable(0,true, GC.Spread.Sheets.SheetArea.colHeader);
sheet.setRowResizable(0,true, GC.Spread.Sheets.SheetArea.rowHeader);
alert( sheet.getColumnResizable(0));
alert( sheet.getRowResizable(0, GC.Spread.Sheets.SheetArea.rowHeader));
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `col` | `number` | The column index. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`boolean`

`true` if the user can resize the specified column; otherwise, `false`.

___

### <a id="getcolumnvisible" name="getcolumnvisible"></a> getColumnVisible

▸ **getColumnVisible**(`col`, `sheetArea?`): `boolean`

Gets whether a column in the specified sheet area is displayed.

**`example`**
```javascript
//This example returns the visible and width settings for a column.
var visible = activeSheet.getColumnVisible(1, GC.Spread.Sheets.SheetArea.viewport);
var width = activeSheet.getColumnWidth(1, GC.Spread.Sheets.SheetArea.viewport);
alert(visible);
alert(width);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `col` | `number` | The column index. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`boolean`

`true` if the column is visible in the sheet area; otherwise, `false`.

___

### <a id="getcolumnwidth" name="getcolumnwidth"></a> getColumnWidth

▸ **getColumnWidth**(`col`, `sheetArea?`, `getDynamicSize?`): `any`

Gets the width in pixels or the dynamic size for the specified column in the specified sheet area.

**`example`**
```javascript
//This example returns the visible and width settings for a column.
var visible = activeSheet.getColumnVisible(1, GC.Spread.Sheets.SheetArea.viewport);
var width = activeSheet.getColumnWidth(1, GC.Spread.Sheets.SheetArea.viewport);
alert(visible);
alert(width);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `col` | `number` | The column index. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |
| `getDynamicSize?` | `boolean` | - |

#### Returns

`any`

The column width in pixels or the dynamic size.

___

### <a id="getcsv" name="getcsv"></a> getCsv

▸ **getCsv**(`row`, `column`, `rowCount`, `columnCount`, `rowDelimiter`, `columnDelimiter`): `string`

Gets delimited text from a range.

**`property`** {number} row The start row.

**`property`** {number} column The start column.

**`property`** {number} rowCount The row count.

**`property`** {number} columnCount The column count.

**`property`** {string} rowDelimiter The row delimiter that is appended to the end of the row.

**`property`** {string} columnDelimiter The column delimiter that is appended to the end of the column.

#### Parameters

| Name | Type |
| :------ | :------ |
| `row` | `number` |
| `column` | `number` |
| `rowCount` | `number` |
| `columnCount` | `number` |
| `rowDelimiter` | `string` |
| `columnDelimiter` | `string` |

#### Returns

`string`

The text from the range with the specified delimiters.

___

### <a id="getcustomfunction" name="getcustomfunction"></a> getCustomFunction

▸ **getCustomFunction**(`name`): `void`

Gets a custom function.

#### Parameters

| Name | Type |
| :------ | :------ |
| `name` | `string` |

#### Returns

`void`

The custom function.

___

### <a id="getcustomname" name="getcustomname"></a> getCustomName

▸ **getCustomName**(`name`): [`NameInfo`](GC.Spread.Sheets.NameInfo)

Gets the specified custom name information.

**`example`**
```javascript
//This example gets the custom name and formula.
activeSheet.setValue(0, 0, 1);
activeSheet.setValue(0, 1, 2);
activeSheet.setValue(0, 2, 3);
activeSheet.addCustomName("customName1", "=12", 0, 0);
activeSheet.addCustomName("customName2", "Average(20,45)", 0, 0);
activeSheet.addCustomName("customName3", "=$A$1:$C$1");
activeSheet.setFormula(1, 0, "customName1");
activeSheet.setFormula(1, 1, "customName2");
activeSheet.setFormula(1, 2, "sum(customName3)");
$("#button1").click(function () {
    let cname = activeSheet.getCustomName("customName2");
    if (cname instanceof GC.Spread.Sheets.NameInfo) {
        //get CustomName
        let name = cname.getName();
        //get Expression
        let expression = cname.getExpression();
        //get Expression String
        let expStr = GC.Spread.Sheets.CalcEngine.expressionToFormula(activeSheet, expression, 0, 0);
        alert("Name:" + name + ";Expression: =" + expStr);
    }
});
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `name` | `string` |

#### Returns

[`NameInfo`](GC.Spread.Sheets.NameInfo)

The information for the specified custom name.

___

### <a id="getcustomnames" name="getcustomnames"></a> getCustomNames

▸ **getCustomNames**(): [`NameInfo`](GC.Spread.Sheets.NameInfo)[]

Gets all custom name information.

#### Returns

[`NameInfo`](GC.Spread.Sheets.NameInfo)[]

The type GC.Spread.Sheets.NameInfo stored in an array.

___

### <a id="getdatacolumnname" name="getdatacolumnname"></a> getDataColumnName

▸ **getDataColumnName**(`column`): `string`

Gets the column name at the specified position.

**`example`**
```javascript
//This example returns the name for the specified bound column.
var test = [
        {"Series0":2,"Series1":1},
        {"Series0":4,"Series1":2},
        {"Series0":3,"Series1":4}
    ];
activeSheet.setDataSource(test);
activeSheet.bindColumn(1,"Series0");
activeSheet.bindColumn(0,"Series1");
var colname = activeSheet.getDataColumnName(0);
alert(colname);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `column` | `number` | The column index for which the name is requested. |

#### Returns

`string`

The column name for data binding.

___

### <a id="getdataitem" name="getdataitem"></a> getDataItem

▸ **getDataItem**(`row`): `any`

Gets the data item.

**`example`**
```javascript
//This example uses the getDataItem method.
var test = [
      { "Series0": 2, "Series1": 1 },
      { "Series0": 4, "Series1": 2 },
      { "Series0": 3, "Series1": 4 }
           ];
           activeSheet.autoGenerateColumns = true;
           activeSheet.setDataSource(test, false);
           alert(JSON.stringify(activeSheet.getDataItem(0)));
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |

#### Returns

`any`

The row data.

___

### <a id="getdatasource" name="getdatasource"></a> getDataSource

▸ **getDataSource**(): `any`

Gets the data source that populates the sheet.

**`function`**

**`example`**
```javascript
var test = [
        {"Series0":2,"Series1":1},
        {"Series0":4,"Series1":2},
        {"Series0":3,"Series1":4}
    ];
activeSheet.setDataSource(test);
alert(activeSheet.getDataSource);
```

#### Returns

`any`

Returns the data source.

___

### <a id="getdatavalidator" name="getdatavalidator"></a> getDataValidator

▸ **getDataValidator**(`row`, `col`, `sheetArea`): [`DefaultDataValidator`](GC.Spread.Sheets.DataValidation.DefaultDataValidator)

Gets the cell data validator.

**`example`**
```javascript
spread.options.highlightInvalidData = true;
var dv = GC.Spread.Sheets.DataValidation.createListValidator("1,2,3");
dv.showInputMessage(true);
dv.inputMessage("Value must be 1,2 or 3");
dv.inputTitle("tip");
activeSheet.setDataValidator(1,1,1,1,dv,GC.Spread.Sheets.SheetArea.viewport);
alert(activeSheet.getDataValidator(1,1).getValidList(activeSheet,1,1));
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `sheetArea` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | The sheet area. If this parameter is not provided, it defaults to `viewport`. |

#### Returns

[`DefaultDataValidator`](GC.Spread.Sheets.DataValidation.DefaultDataValidator)

Returns the cell data validator for the specified cell.

___

### <a id="getdefaultstyle" name="getdefaultstyle"></a> getDefaultStyle

▸ **getDefaultStyle**(`sheetArea?`): [`Style`](GC.Spread.Sheets.Style)

Gets the default style information for the sheet.

**`example`**
```javascript
//This example uses the getDefaultStyle method.
var defaultStyle = new GC.Spread.Sheets.Style();
defaultStyle.backColor = "LemonChiffon";
defaultStyle.foreColor = "Red";
defaultStyle.borderLeft = new GC.Spread.Sheets.LineBorder("Green");
defaultStyle.borderTop = new GC.Spread.Sheets.LineBorder("Green");
defaultStyle.borderRight = new GC.Spread.Sheets.LineBorder("Green");
defaultStyle.borderBottom = new GC.Spread.Sheets.LineBorder("Green");
activeSheet.setDefaultStyle(defaultStyle, GC.Spread.Sheets.SheetArea.viewport);
var cstyle = activeSheet.getDefaultStyle(GC.Spread.Sheets.SheetArea.viewport);
alert(cstyle.backColor);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) |

#### Returns

[`Style`](GC.Spread.Sheets.Style)

Returns the sheet's default style.

___

### <a id="getdefaultvalue" name="getdefaultvalue"></a> getDefaultValue

▸ **getDefaultValue**(`row`, `col`): `any`

Gets the default value from the specified cell.

**`example`**
```javascript
sheet.setDefaultValue(0, 0, 20);
let defaultValue = sheet.getDefaultValue(0, 0);
let value = sheet.getValue(0, 0); // the value equals to defaultValue
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |

#### Returns

`any`

Returns the default value of cell.

___

### <a id="getdeletedrows" name="getdeletedrows"></a> getDeletedRows

▸ **getDeletedRows**(): `any`[]

Gets the deleted row collection.

#### Returns

`any`[]

The deleted rows collection. the item in array contains two properties, row.row: specifies deleted row index, row.originalItem: specifies deleted data item.

___

### <a id="getdependents" name="getdependents"></a> getDependents

▸ **getDependents**(`row`, `col`): [`ICellsInfo`](../interfaces/GC.Spread.Sheets.ICellsInfo)[]

 Gets the dependent CellRange information object array of the cell.

**`example`**
```javascript
sheet.getDependents(1, 1);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |

#### Returns

[`ICellsInfo`](../interfaces/GC.Spread.Sheets.ICellsInfo)[]

Returns dependent cell information object array
dependentsInfo.row {number} Indicates the cellRange row index.
dependentsInfo.col {number} Indicates the cellRange col index.
dependentsInfo.rowCount {number} Indicates the cellRange row count.
dependentsInfo.colCount {number} Indicates the cellRange colcount.
dependentsInfo.sheetName {string} Indicates the workSheet name.

___

### <a id="getdirtycells" name="getdirtycells"></a> getDirtyCells

▸ **getDirtyCells**(`row`, `col`, `rowCount`, `colCount`): [`IDirtyCellInfo`](../interfaces/GC.Spread.Sheets.IDirtyCellInfo)[]

Gets the dirty cell collection.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `rowCount` | `number` | The number of rows in the range of dirty cells. |
| `colCount` | `number` | The number of columns in the range of dirty cells. |

#### Returns

[`IDirtyCellInfo`](../interfaces/GC.Spread.Sheets.IDirtyCellInfo)[]

The dirty cells.

___

### <a id="getdirtyrows" name="getdirtyrows"></a> getDirtyRows

▸ **getDirtyRows**(): `any`[]

Gets the dirty row collection.

#### Returns

`any`[]

The dirty rows collection, the item in array contains three properties, row.row: specifies row index, row.item: specifies data item of current row, row.originalItem: specifies original data item of the row.

___

### <a id="getformatter" name="getformatter"></a> getFormatter

▸ **getFormatter**(`row`, `col`, `sheetArea`): `any`

Gets the cell formatter.

**`example`**
```javascript
//This example returns the format object for the active sheet.
activeSheet.getCell(0, 1).formatter("M");
activeSheet.setValue(0, 1, new Date(2011, 2, 9));
var style = activeSheet.getFormatter(0,1,GC.Spread.Sheets.SheetArea.viewport);
alert(style);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `sheetArea` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | The sheet area. If this parameter is not provided, it defaults to `viewport`. |

#### Returns

`any`

Returns the cell formatter string or object for the specified cell.

___

### <a id="getformula" name="getformula"></a> getFormula

▸ **getFormula**(`row`, `col`, `sheetArea?`): `string`

Gets the formula in the specified cell in this sheet.

**`example`**
```javascript
//This example returns the formula in the specified cell.
activeSheet.setValue(0,0,1);
activeSheet.setValue(0,1,2);
activeSheet.setValue(0,2,10);
activeSheet.getCell(1,1).formula("=SUM(A1:C1)");
let formula = activeSheet.getFormula(1, 1, GC.Spread.Sheets.SheetArea.viewport);
alert(formula);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`string`

Returns the formula string.

___

### <a id="getformulainformation" name="getformulainformation"></a> getFormulaInformation

▸ **getFormulaInformation**(`row`, `col`): [`IFormulaInfo`](../interfaces/GC.Spread.Sheets.IFormulaInfo)

Gets the formula detail information in the specified cell in this sheet.

**`example`**
```javascript
activeSheet.setValue(0,0,1);
activeSheet.setValue(0,1,2);
activeSheet.setValue(0,2,10);
activeSheet.getCell(1,1).formula("=SUM(A1:C1)");
let test = activeSheet.getFormulaInformation(1,1, GC.Spread.Sheets.SheetArea.viewport);
alert(test.formula);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |

#### Returns

[`IFormulaInfo`](../interfaces/GC.Spread.Sheets.IFormulaInfo)

formulaInfo - Returns the formula information about the cell.
formulaInfo.hasFormula {boolean} Indicates whether there is a formula in the cell.
formulaInfo.isArrayFormula {boolean} Indicates whether the formula is an array formula.
formulaInfo.formula {string} The formula string.
formulaInfo.formulaWithCulture {string} The formula string with culture.

___

### <a id="gethyperlink" name="gethyperlink"></a> getHyperlink

▸ **getHyperlink**(`row`, `col`, `sheetArea?`): [`IHyperlink`](../interfaces/GC.Spread.Sheets.IHyperlink)

Sets the hyperlink data for the specified cell in the specified sheet area.

**`example`**
```javascript
//This example uses the getHyperlink method.
let firstHyperlinkData = sheet.getHyperlink(0, 2, GC.Spread.Sheets.SheetArea.viewport);
let secondHyperlinkData = sheet.setHyperlink(1, 1, GC.Spread.Sheets.SheetArea.viewport);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | The sheet area. If this parameter is not provided, it defaults to `viewport`. |

#### Returns

[`IHyperlink`](../interfaces/GC.Spread.Sheets.IHyperlink)

___

### <a id="getid" name="getid"></a> getId

▸ **getId**(): `string`

Get the id of the worksheet

#### Returns

`string`

The id of the worksheet

___

### <a id="getinsertrows" name="getinsertrows"></a> getInsertRows

▸ **getInsertRows**(): `any`[]

Gets the inserted row collection.

#### Returns

`any`[]

The inserted rows collection, the item in array contains two properties, row.row: specifies insert row index, row.item: specifies insert data item.

___

### <a id="getnamedstyle" name="getnamedstyle"></a> getNamedStyle

▸ **getNamedStyle**(`name`): [`Style`](GC.Spread.Sheets.Style)

Gets a style from the Worksheet named styles collection which has the specified name.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `name` | `string` | The name of the style to return. |

#### Returns

[`Style`](GC.Spread.Sheets.Style)

Returns the specified named style.

___

### <a id="getnamedstyles" name="getnamedstyles"></a> getNamedStyles

▸ **getNamedStyles**(): [`Style`](GC.Spread.Sheets.Style)[]

Gets named styles from the Worksheet.

#### Returns

[`Style`](GC.Spread.Sheets.Style)[]

The GC.Spread.Sheets.Style array of named styles.

___

### <a id="getparent" name="getparent"></a> getParent

▸ **getParent**(): [`Workbook`](GC.Spread.Sheets.Workbook)

Gets the parent Spread object of the current sheet.

#### Returns

[`Workbook`](GC.Spread.Sheets.Workbook)

Returns the parent Spread object of the current sheet.

___

### <a id="getprecedents" name="getprecedents"></a> getPrecedents

▸ **getPrecedents**(`row`, `col`): [`ICellsInfo`](../interfaces/GC.Spread.Sheets.ICellsInfo)[]

 Gets the precedent CellRange information object array of the cell.

**`example`**
```javascript
sheet.getPrecedents(1, 1);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |

#### Returns

[`ICellsInfo`](../interfaces/GC.Spread.Sheets.ICellsInfo)[]

Returns precedent cellRange information object array
precedentsInfo.row {number} Indicates the cellRange row index.
precedentsInfo.col {number} Indicates the cellRange col index.
precedentsInfo.rowCount {number} Indicates the cellRange row count.
precedentsInfo.colCount {number} Indicates the cellRange colcount.
precedentsInfo.sheetName {string} Indicates the workSheet name.

___

### <a id="getrange" name="getrange"></a> getRange

▸ **getRange**(`row`, `col`, `rowCount?`, `colCount?`, `sheetArea?`): [`CellRange`](GC.Spread.Sheets.CellRange)

Gets a range of cells by row info and column info in the specified sheet area.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `rowCount?` | `number` | The row count of the range. If you do not provide this parameter, it defaults to `1`. |
| `colCount?` | `number` | The column count of the range. If you do not provide this parameter, it defaults to `1`. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | The sheet area. If this parameter is not given, it defaults to`viewport`. |

#### Returns

[`CellRange`](GC.Spread.Sheets.CellRange)

The cellRange.
If row is -1 and rowCount is -1, the range represents columns. For example, sheet.getRange(-1,4,-1,6) returns the columns "E:J".
If col is -1 and colCount is -1, the range represents rows. For example, sheet.getRange(4,-1,6,-1) returns the rows "5:10".

▸ **getRange**(`address`, `sheetArea?`): [`CellRange`](GC.Spread.Sheets.CellRange)

Gets a range of cells by A1 style address(not support R1C1 style) in the specified sheet area.

**`example`**
```javascript
// Get a single cell, it equals to sheet.getRange(0, 0, 1, 1)
sheet.getRange("A1")
// Get whole columns, it equals to sheet.getRange(-1, 0, -1, 3)
sheet.getRange("A:C")
// Get whole rows, it equals to sheet.getRange(0, -1, 3, -1)
sheet.getRange("1:3")
// Get a range, it equals to sheet.getRange(0, 0, 3, 3)
sheet.getRange("A1:C3")
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `address` | `string` | The range address string. For example "C1", "A:C", "A1:C3", "1:3". |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | The sheet area. If this parameter is not given, it defaults to`viewport`. |

#### Returns

[`CellRange`](GC.Spread.Sheets.CellRange)

The cellRange.

___

### <a id="getrowcount" name="getrowcount"></a> getRowCount

▸ **getRowCount**(`sheetArea?`): `number`

Gets the row count in the specified sheet area.

**`example`**
```javascript
//This example gets the row count.
var count = activeSheet.getRowCount(GC.Spread.Sheets.SheetArea.viewport);
alert(count);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) |

#### Returns

`number`

The number of rows.

___

### <a id="getrowheight" name="getrowheight"></a> getRowHeight

▸ **getRowHeight**(`row`, `sheetArea?`, `getDynamicSize?`): `any`

Gets the height in pixels or the dynamic size for the specified row in the specified sheet area.

**`example`**
```javascript
//This example returns the height for the specified row.
var rheight = activeSheet.getRowHeight(1,GC.Spread.Sheets.SheetArea.viewport);
alert(rheight);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |
| `getDynamicSize?` | `boolean` | - |

#### Returns

`any`

The row height in pixels or the dynamic size.

___

### <a id="getrowpagebreak" name="getrowpagebreak"></a> getRowPageBreak

▸ **getRowPageBreak**(`row`): `boolean`

Gets whether a forced page break is inserted before the specified row on this sheet when printing.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |

#### Returns

`boolean`

`true` if a forced page break is inserted before the specified row; otherwise, `false`.

___

### <a id="getrowresizable" name="getrowresizable"></a> getRowResizable

▸ **getRowResizable**(`row`, `sheetArea?`): `boolean`

Gets a value that indicates whether users can resize the specified row in the specified sheet area.

**`example`**
```javascript
//This example gets whether the row is resizable.
sheet.setRowCount(10);
sheet.setColumnCount(7);
sheet.setValue(0, 0,"Western");
sheet.setValue(0, 1,"Western");
sheet.setValue(0, 2,"Western");
sheet.setValue(1, 0,"A");
sheet.setValue(1, 1,"B");
sheet.setValue(1, 2,"C");
sheet.setColumnResizable(0,true, GC.Spread.Sheets.SheetArea.colHeader);
sheet.setRowResizable(0,true, GC.Spread.Sheets.SheetArea.rowHeader);
alert( sheet.getColumnResizable(0));
alert( sheet.getRowResizable(0, GC.Spread.Sheets.SheetArea.rowHeader));
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`boolean`

`true` if the users can resize the specified row; otherwise, `false`.

___

### <a id="getrowvisible" name="getrowvisible"></a> getRowVisible

▸ **getRowVisible**(`row`, `sheetArea?`): `boolean`

Gets whether the control displays the specified row.

**`example`**
```javascript
//This example returns the visible setting for the specified row.
rvisible = activeSheet.getRowVisible(1,GC.Spread.Sheets.SheetArea.viewport);
alert(rvisible);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`boolean`

`true` if the row is visible in the sheet area; otherwise, `false`.

___

### <a id="getselections" name="getselections"></a> getSelections

▸ **getSelections**(): [`Range`](GC.Spread.Sheets.Range)[]

Gets the selections in the current sheet.

#### Returns

[`Range`](GC.Spread.Sheets.Range)[]

The type GC.Spread.Sheets.Range is stored in an Array.

___

### <a id="getsortstate" name="getsortstate"></a> getSortState

▸ **getSortState**(): [`ISortState`](../interfaces/GC.Spread.Sheets.ISortState)

Get last sort state in this sheet.

**`example`**
```javascript
//This example get sort state.
sheet.setValue(0,0,"112");
sheet.setValue(1,0,"10");
sheet.setValue(2,0,"223");
sheet.setValue(3,0,"20");
sheet.setValue(4,0,"334");
sheet.setValue(5,0,"30");
sheet.sortRange(0, 0, 6, 1, true, [{index:0, ascending:true}]);
let sortState = sheet.getSortState();
```

#### Returns

[`ISortState`](../interfaces/GC.Spread.Sheets.ISortState)

the last sort state info .

___

### <a id="getspans" name="getspans"></a> getSpans

▸ **getSpans**(`range?`, `sheetArea?`): [`Range`](GC.Spread.Sheets.Range)[]

Gets the spans in the specified range in the specified sheet area.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `range?` | [`Range`](GC.Spread.Sheets.Range) | The cell range. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

[`Range`](GC.Spread.Sheets.Range)[]

An array that contains span information whose item type is GC.Spread.Sheets.Range.

___

### <a id="getsparkline" name="getsparkline"></a> getSparkline

▸ **getSparkline**(`row`, `column`): [`Sparkline`](GC.Spread.Sheets.Sparklines.Sparkline)

 Gets the sparkline for the specified cell.

**`example`**
```javascript
//This example creates and gets a sparkline.
var cellr = new GC.Spread.Sheets.Range(0, 0, 1, 5);
var ex = new GC.Spread.Sheets.Sparklines.SparklineSetting();
ex.options.SeriesColor  = "Aquamarine";
sheet.setValue(0, 0, 2);
sheet.setValue(0, 1, 5);
sheet.setValue(0, 2, 4);
sheet.setValue(0, 3, -1);
sheet.setValue(0, 4, 3);
sheet.setSparkline(0, 5, cellr, GC.Spread.Sheets.Sparklines.DataOrientation.horizontal, GC.Spread.Sheets.Sparklines.SparklineType.column, ex);
alert(sheet.getSparkline(0, 5).toString());
//sheet.removeSparkline(0, 5);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `column` | `number` | - |

#### Returns

[`Sparkline`](GC.Spread.Sheets.Sparklines.Sparkline)

The sparkline for the cell.

___

### <a id="getstyle" name="getstyle"></a> getStyle

▸ **getStyle**(`row`, `column`, `sheetArea?`): [`Style`](GC.Spread.Sheets.Style)

Gets the style information for a specified cell in the specified sheet area.

**`example`**
```javascript
//This example uses the getStyle method.
var style = new GC.Spread.Sheets.Style();
style.backColor = "red";
style.borderLeft =new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
style.borderTop = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
style.borderRight = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
style.borderBottom = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
var cstyle = activeSheet.getStyle(1,1,GC.Spread.Sheets.SheetArea.viewport);
alert(cstyle.backColor);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `column` | `number` | The column index. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

[`Style`](GC.Spread.Sheets.Style)

Returns the cell style of the specified cell.

___

### <a id="getstylename" name="getstylename"></a> getStyleName

▸ **getStyleName**(`row`, `column`, `sheetArea?`): `string`

Gets the name of the style for a specified cell in the specified sheet area.

**`example`**
```javascript
//This example uses the getStyleName method.
var namedStyle = new GC.Spread.Sheets.Style();
namedStyle.name = "style1";
namedStyle.backColor = "green";
activeSheet.addNamedStyle(namedStyle);
activeSheet.setStyleName(1, 1, "style1"); // cell(1,1)'s backColor is  green.
activeSheet.setStyleName(2, 1, "style1");
alert(activeSheet.getStyleName(1,1,GC.Spread.Sheets.SheetArea.viewport));
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `column` | `number` | The column index. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`string`

Returns the name string for the style.

___

### <a id="gettag" name="gettag"></a> getTag

▸ **getTag**(`row`, `col`, `sheetArea?`): `any`

Gets the tag value from the specified cell in the specified sheet area.

**`example`**
```javascript
//This example adds and gets a cell tag.
activeSheet.getRange(1, -1, 1, -1).tag("row tag");
alert(activeSheet.getTag(1,-1,GC.Spread.Sheets.SheetArea.viewport));
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | The sheet area. If this parameter is not provided, it defaults to `viewport`. |

#### Returns

`any`

Returns the tag value of the cell.

___

### <a id="gettext" name="gettext"></a> getText

▸ **getText**(`row`, `col`, `sheetArea?`): `string`

Gets the formatted text in the cell in the specified sheet area.

**`example`**
```javascript
activeSheet.getText(1, 0);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`string`

Returns the formatted text of the cell.

___

### <a id="getusedrange" name="getusedrange"></a> getUsedRange

▸ **getUsedRange**(`type?`): [`Range`](GC.Spread.Sheets.Range)

Get the range used in the sheet

**`example`**
```javascript
var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"),{sheetCount:1});
var sheet = spread.getSheet(0);
sheet.setValue(2, 2, "value");
sheet.setValue(4, 2, "value");
sheet.setValue(6, 8, "value");
sheet.setValue(10, 15, "value");
sheet.setFormula(5, 5, "=C3");
sheet.setFormula(8, 8, "=I6");
sheet.setStyle(30,4, new GC.Spread.Sheets.Style())
sheet.setStyle(3, 24, new GC.Spread.Sheets.Style())
sheet.setRowHeight(8, 40);
sheet.getUsedRange(GC.Spread.Sheets.UsedRangeType.all);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `type?` | [`UsedRangeType`](../enums/GC.Spread.Sheets.UsedRangeType) |

#### Returns

[`Range`](GC.Spread.Sheets.Range)

If no value is set, returns null; otherwise, returns a used range.

___

### <a id="getvalue" name="getvalue"></a> getValue

▸ **getValue**(`row`, `col`, `sheetArea?`, `valueType?`): `any`

Gets the unformatted data from the specified cell in the specified sheet area.

**`example`**
```javascript
activeSheet.getValue(1, 1, GC.Spread.Sheets.SheetArea.viewport, GC.Spread.Sheets.ValueType.richText);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |
| `valueType?` | [`ValueType`](../enums/GC.Spread.Sheets.ValueType) | - |

#### Returns

`any`

Returns the value of the cell.

___

### <a id="getviewportbottomrow" name="getviewportbottomrow"></a> getViewportBottomRow

▸ **getViewportBottomRow**(`rowViewportIndex`): `number`

Gets the index of the bottom row in the viewport.

**`example`**
```javascript
//This example returns the indices for the bottom and top rows and left and right columns in the current sheet view.
var brow = activeSheet.getViewportBottomRow(1);
var lcol = activeSheet.getViewportLeftColumn(1);
var rcol = activeSheet.getViewportRightColumn(1);
var trow = activeSheet.getViewportTopRow(1);
alert(brow);
alert(lcol);
alert(rcol);
alert(trow);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `rowViewportIndex` | `number` | The index of the viewport. |

#### Returns

`number`

The index of the bottom row in the viewport.

___

### <a id="getviewportheight" name="getviewportheight"></a> getViewportHeight

▸ **getViewportHeight**(`rowViewportIndex`): `number`

Gets the height of the specified viewport row for the active sheet.

**`example`**
```javascript
//This example uses the getViewportHeight method.
alert(activeSheet.getViewportHeight(1));
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `rowViewportIndex` | `number` | The index of the row viewport. |

#### Returns

`number`

The height of the viewport.

___

### <a id="getviewportleftcolumn" name="getviewportleftcolumn"></a> getViewportLeftColumn

▸ **getViewportLeftColumn**(`columnViewportIndex`): `number`

Gets the index of the left column in the viewport.

**`example`**
```javascript
//This example returns the indices for the bottom and top rows and left and right columns in the current sheet view.
var brow = activeSheet.getViewportBottomRow(1);
var lcol = activeSheet.getViewportLeftColumn(1);
var rcol = activeSheet.getViewportRightColumn(1);
var trow = activeSheet.getViewportTopRow(1);
alert(brow);
alert(lcol);
alert(rcol);
alert(trow);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `columnViewportIndex` | `number` | The index of the viewport. |

#### Returns

`number`

The index of the left column in the viewport.

___

### <a id="getviewportrightcolumn" name="getviewportrightcolumn"></a> getViewportRightColumn

▸ **getViewportRightColumn**(`columnViewportIndex`): `number`

Gets the index of the right column in the viewport.

**`example`**
```javascript
//This example returns the indices for the bottom and top rows and left and right columns in the current sheet view.
var brow = activeSheet.getViewportBottomRow(1);
var lcol = activeSheet.getViewportLeftColumn(1);
var rcol = activeSheet.getViewportRightColumn(1);
var trow = activeSheet.getViewportTopRow(1);
alert(brow);
alert(lcol);
alert(rcol);
alert(trow);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `columnViewportIndex` | `number` | The index of the viewport. |

#### Returns

`number`

The index of the right column in the viewport.

___

### <a id="getviewporttoprow" name="getviewporttoprow"></a> getViewportTopRow

▸ **getViewportTopRow**(`rowViewportIndex`): `number`

Gets the index of the top row in the viewport.

**`example`**
```javascript
//This example returns the indices for the bottom and top rows and left and right columns in the current sheet view.
var brow = activeSheet.getViewportBottomRow(1);
var lcol = activeSheet.getViewportLeftColumn(1);
var rcol = activeSheet.getViewportRightColumn(1);
var trow = activeSheet.getViewportTopRow(1);
alert(brow);
alert(lcol);
alert(rcol);
alert(trow);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `rowViewportIndex` | `number` | The index of the viewport. |

#### Returns

`number`

The index of the top row in the viewport.

___

### <a id="getviewportwidth" name="getviewportwidth"></a> getViewportWidth

▸ **getViewportWidth**(`columnViewportIndex`): `number`

Gets the width of the specified viewport column for the active sheet.

**`example`**
```javascript
//This example uses the getViewportWidth method.
alert(activeSheet.getViewportWidth(1));
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `columnViewportIndex` | `number` | The index of the column viewport. |

#### Returns

`number`

The width of the viewport

___

### <a id="groupsparkline" name="groupsparkline"></a> groupSparkline

▸ **groupSparkline**(`sparklines`): [`SparklineGroup`](GC.Spread.Sheets.Sparklines.SparklineGroup)

Groups the sparklines.

**`example`**
```javascript
//This example groups a sparkline.
sheet.setValue(0, 0, "Data Range is A2-A9");
sheet.setValue(1, 0, 1);
sheet.setValue(2, 0, -2);
sheet.setValue(3, 0, -1);
sheet.setValue(4, 0, 6);
sheet.setValue(5, 0, 4);
sheet.setValue(6, 0, -4);
sheet.setValue(7, 0, 3);
sheet.setValue(8, 0, 8);
var data = new GC.Spread.Sheets.Range(1, 0, 8, 1);
var setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
var s1=  sheet.setSparkline(13, 0, data
        , GC.Spread.Sheets.Sparklines.DataOrientation.vertical
        , GC.Spread.Sheets.Sparklines.SparklineType.line
        , setting
        );
var s2 =sheet.setSparkline(13, 3, data
        , GC.Spread.Sheets.Sparklines.DataOrientation.vertical
        , GC.Spread.Sheets.Sparklines.SparklineType.column
        , setting
        );
var s3=  sheet.setSparkline(13, 6, data
        , GC.Spread.Sheets.Sparklines.DataOrientation.vertical
        , GC.Spread.Sheets.Sparklines.SparklineType.winloss
        , setting
        );
var group = sheet.groupSparkline([s1,s2,s3]);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `sparklines` | [`Sparkline`](GC.Spread.Sheets.Sparklines.Sparkline)[] | The sparklines to group. |

#### Returns

[`SparklineGroup`](GC.Spread.Sheets.Sparklines.SparklineGroup)

The sparkline group.

___

### <a id="haspassword" name="haspassword"></a> hasPassword

▸ **hasPassword**(): `boolean`

Get whether worksheet has set a password for protection.

**`property`** {string} password Sheet protection password.

**`example`**
```javascript
let password = "fe4c4be8"
sheet.protect(password);
if(sheet.hasPassword()) {
    sheet.unprotect(password);
} else {
    sheet.unprotect();
}
```

#### Returns

`boolean`

Returns true if the password is set, otherwise false

___

### <a id="haspendingchanges" name="haspendingchanges"></a> hasPendingChanges

▸ **hasPendingChanges**(): `boolean`

Gets whether there is a dirty, insert, or delete status for the specified range.

#### Returns

`boolean`

`true` if any of the rows or cells in the range are dirty, or have been inserted or deleted; otherwise, `false`.

___

### <a id="hittest" name="hittest"></a> hitTest

▸ **hitTest**(`x`, `y`): [`IHitTestInformation`](../interfaces/GC.Spread.Sheets.IHitTestInformation)

Performs a hit test.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `x` | `number` | The <i>x</i>-coordinate. |
| `y` | `number` | The <i>y</i>-coordinate. |

#### Returns

[`IHitTestInformation`](../interfaces/GC.Spread.Sheets.IHitTestInformation)

The hit test information.

___

### <a id="invalidatelayout" name="invalidatelayout"></a> invalidateLayout

▸ **invalidateLayout**(): `void`

Invalidates the sheet layout.

**`example`**
```javascript
//This example updates the layout.
activeSheet.columnOutlines.group(0, 1);
activeSheet.invalidateLayout();
activeSheet.repaint();
```

#### Returns

`void`

___

### <a id="isdirtysuspended" name="isdirtysuspended"></a> isDirtySuspended

▸ **isDirtySuspended**(): `boolean`

Gets whether recording the dirty data is suspended.

**`example`**
```javascript
//This example uses the isDirtySuspended method.
var customers = [
               { ID: 0, Name: 'A', Info1: 'Info0' },
               { ID: 1, Name: 'B', Info1: 'Info1' },
               { ID: 2, Name: 'C', Info1: 'Info2' },
            ];
activeSheet.setDataSource(customers);
activeSheet.suspendDirty();
alert(activeSheet.isDirtySuspended());
activeSheet.resumeDirty();
alert(activeSheet.isDirtySuspended());
```

#### Returns

`boolean`

Whether the dirty data is suspended.

___

### <a id="isediting" name="isediting"></a> isEditing

▸ **isEditing**(): `boolean`

Gets whether the sheet is in edit mode.

**`example`**
```javascript
//This example uses the isEditing method.
alert(activeSheet.isEditing());
```

#### Returns

`boolean`

`true` if the sheet is in edit mode; otherwise, `false`.

___

### <a id="ispaintsuspended" name="ispaintsuspended"></a> isPaintSuspended

▸ **isPaintSuspended**(): `boolean`

Get if sheet paint is suspended.

#### Returns

`boolean`

___

### <a id="isprintlinevisible" name="isprintlinevisible"></a> isPrintLineVisible

▸ **isPrintLineVisible**(`value?`): `boolean`

Gets or sets whether display a print line for the sheet.

#### Parameters

| Name | Type |
| :------ | :------ |
| `value?` | `boolean` |

#### Returns

`boolean`

If no value is set, returns a value indicating whether the print line is displayed

___

### <a id="isselected" name="isselected"></a> isSelected

▸ **isSelected**(`selectedState?`): `any`

Gets or sets the selected state of the worksheet.

**`example`**
```javascript
spread.sheets[0].isSelected();
spread.sheets[1].isSelected(true);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `selectedState?` | `boolean` |

#### Returns

`any`

If no selectedState is set, returns the worksheet selected state; otherwise, returns the worksheet.

___

### <a id="isvalid" name="isvalid"></a> isValid

▸ **isValid**(`row`, `column`, `value`): `boolean`

Determines whether the cell value is valid.

**`example`**
```javascript
//This example uses the isValid method.
alert(activeSheet.isValid(0, 0, 10));
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `column` | `number` | The column index. |
| `value` | `Object` | The cell value. |

#### Returns

`boolean`

`true` if the value is valid; otherwise, `false`.

___

### <a id="moveto" name="moveto"></a> moveTo

▸ **moveTo**(`fromRow`, `fromColumn`, `toRow`, `toColumn`, `rowCount`, `columnCount`, `option`): `void`

Moves data from one range to another.

**`example`**
```javascript
//This example moves the data to the specified location.
activeSheet.getCell(0,0).value("A1");
activeSheet.getCell(1,1).value("Test")
activeSheet.moveTo(0,0,3,3,2,2,GC.Spread.Sheets.CopyToOptions.value);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `fromRow` | `number` | The source row. |
| `fromColumn` | `number` | The source column. |
| `toRow` | `number` | The target row. |
| `toColumn` | `number` | The target column. |
| `rowCount` | `number` | The row count. |
| `columnCount` | `number` | The column count. |
| `option` | [`CopyToOptions`](../enums/GC.Spread.Sheets.CopyToOptions) | The copy option. |

#### Returns

`void`

___

### <a id="name" name="name"></a> name

▸ **name**(`value?`): `any`

Gets or sets the name of the worksheet.

**`example`**
```javascript
spread.sheets[0].name("The first sheet");
spread.sheets[1].name( "The second sheet");
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `value?` | `string` |

#### Returns

`any`

If no value is set, returns the worksheet name; otherwise, returns the worksheet.

___

### <a id="printinfo" name="printinfo"></a> printInfo

▸ **printInfo**(`value?`): `any`

Gets or sets the print information for the sheet.

#### Parameters

| Name | Type |
| :------ | :------ |
| `value?` | [`PrintInfo`](GC.Spread.Sheets.Print.PrintInfo) |

#### Returns

`any`

If no value is set, returns the print information for the sheet; otherwise, returns the sheet.

___

### <a id="protect" name="protect"></a> protect

▸ **protect**(`password?`): `void`

Protects a worksheet. Do nothing if the worksheet has already been protected.

**`property`** {string} password Sheet protection password.

**`example`**
```javascript
let password = "fe4c4be8"
sheet.protect(password);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `password?` | `string` |

#### Returns

`void`

___

### <a id="recalcall" name="recalcall"></a> recalcAll

▸ **recalcAll**(`refreshAll?`): `void`

Recalculates all the formulas in the sheet.

**`deprecated`** since version 16.2.0, please use 'spread.calculate' instead

**`example`**
```javascript
//This example uses the recalcAll method.
activeSheet.setValue(0,0,1);
activeSheet.setValue(0,1,2);
activeSheet.setValue(0,2,10);
activeSheet.getCell(1,1).formula("=SUM(A1:C1)");
activeSheet.recalcAll();
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `refreshAll?` | `boolean` | Specifies whether to rebuild all fromula reference, custom name and custom functions. |

#### Returns

`void`

___

### <a id="removecustomfunction" name="removecustomfunction"></a> removeCustomFunction

▸ **removeCustomFunction**(`name`): `void`

Removes a custom function.

**`example`**
```javascript
//This example uses the removeCustomFunction method.
// Add Custom function
// Type =myfunc(1)
// in a cell to see the result
function myfunc() {}
myfunc.prototype = new GC.Spread.CalcEngine.Functions.Function("myfunc", 0, 0, {name: "myfunc",description: "This is my first function"});
myfunc.prototype.evaluate = function (args) {
    return 100;
}
activeSheet.addCustomFunction(new myfunc());
activeSheet.removeCustomFunction("myfunc");
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `name` | `string` |

#### Returns

`void`

___

### <a id="removecustomname" name="removecustomname"></a> removeCustomName

▸ **removeCustomName**(`name`): `void`

Removes the specified custom name.

**`example`**
```javascript
//This example uses the removeCustomName method.
activeSheet.setValue(0, 0, 1);
activeSheet.setValue(0, 1, 2);
activeSheet.setValue(0, 2, 3);
activeSheet.addCustomName("customName1","=12", 0, 0);
activeSheet.addCustomName("customName2","Average(20,45)", 0, 0);
activeSheet.addCustomName("customName3", "=$A$1:$C$1", 0, 0);
activeSheet.setFormula(1, 0, "customName1");
activeSheet.setFormula(1, 1, "customName2");
activeSheet.setFormula(1, 2, "sum(customName3)");
//activeSheet.removeCustomName("customName3");
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `name` | `string` |

#### Returns

`void`

___

### <a id="removenamedstyle" name="removenamedstyle"></a> removeNamedStyle

▸ **removeNamedStyle**(`name`): `void`

Removes a style from the Worksheet named styles collection which has the specified name.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `name` | `string` | The name of the style to remove. |

#### Returns

`void`

___

### <a id="removespan" name="removespan"></a> removeSpan

▸ **removeSpan**(`row`, `col`, `sheetArea?`): `void`

Removes the span that contains a specified anchor cell in the specified sheet area.

**`example`**
```javascript
activeSheet.addSpan(0,0,3,3,GC.Spread.Sheets.SheetArea.viewport);
//activeSheet.removeSpan(0, 0, GC.Spread.Sheets.SheetArea.viewport);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index of the anchor cell for the span (at which spanned cells start). |
| `col` | `number` | The column index of the anchor cell for the span (at which spanned cells start). |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`void`

___

### <a id="removesparkline" name="removesparkline"></a> removeSparkline

▸ **removeSparkline**(`row`, `col`): `void`

Removes the sparkline for the specified cell.

**`example`**
```javascript
//This example removes a sparkline.
var cellr = new GC.Spread.Sheets.Range(0, 0, 1, 5);
var ex = new GC.Spread.Sheets.Sparklines.SparklineSetting();
ex.options.SeriesColor  = "Aquamarine";
sheet.setValue(0, 0, 2);
sheet.setValue(0, 1, 5);
sheet.setValue(0, 2, 4);
sheet.setValue(0, 3, -1);
sheet.setValue(0, 4, 3);
sheet.setSparkline(0, 5, cellr, GC.Spread.Sheets.Sparklines.DataOrientation.horizontal, GC.Spread.Sheets.Sparklines.SparklineType.column, ex);
alert(sheet.getSparkline(0, 5).toString());
//sheet.removeSparkline(0, 5);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |

#### Returns

`void`

___

### <a id="repaint" name="repaint"></a> repaint

▸ **repaint**(`clipRect?`): `void`

Repaints the specified rectangle.

**`example`**
```javascript
//This example causes a repaint.
var cellrange =new GC.Spread.Sheets.Range(0, 0, 5, 1);
var hideRowFilter =new GC.Spread.Sheets.Filter.HideRowFilter(cellrange);
sheet.rowFilter(hideRowFilter);
sheet.resumePaint();
sheet.repaint();
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `clipRect?` | [`Rect`](GC.Spread.Sheets.Rect) | The rectangle to repaint. |

#### Returns

`void`

___

### <a id="reset" name="reset"></a> reset

▸ **reset**(): `void`

Resets the sheet.

**`example`**
```javascript
//This example uses the reset method.
activeSheet.reset();
```

#### Returns

`void`

___

### <a id="resumecalcservice" name="resumecalcservice"></a> resumeCalcService

▸ **resumeCalcService**(`recalcAll?`): `void`

Resumes the calculation service.

**`example`**
```javascript
//This example uses the resumeCalcService method.
activeSheet.suspendCalcService(false);
activeSheet.setValue(0,0,1);
activeSheet.setValue(0,1,2);
activeSheet.setValue(0,2,10);
activeSheet.getCell(1,1).formula("=SUM(A1:C1)");
activeSheet.resumeCalcService(true);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `recalcAll?` | `boolean` | Specifies whether to recalculate all formulas. |

#### Returns

`void`

___

### <a id="resumedirty" name="resumedirty"></a> resumeDirty

▸ **resumeDirty**(): `void`

Resumes recording the dirty data.

**`example`**
```javascript
//This example uses the resumeDirty method.
 var customers = [
               { ID: 0, Name: 'A', Info1: 'Info0' },
               { ID: 1, Name: 'B', Info1: 'Info1' },
               { ID: 2, Name: 'C', Info1: 'Info2' },
            ];
activeSheet.setDataSource(customers);
activeSheet.suspendDirty();
alert(activeSheet.isDirtySuspended());
activeSheet.resumeDirty();
alert(activeSheet.isDirtySuspended());
```

#### Returns

`void`

___

### <a id="resumeevent" name="resumeevent"></a> resumeEvent

▸ **resumeEvent**(): `void`

Resumes the event.

**`example`**
```javascript
//This example suspends and resumes the event.
 activeSheet.bind(GC.Spread.Sheets.Events.CellChanged, function (sender, args) {
    if (args.propertyName === "value") {
        alert(activeSheet.getValue(args.row, args.col));
    }
});
activeSheet.suspendEvent();
activeSheet.setValue(0, 0, "111");
activeSheet.resumeEvent();
activeSheet.setValue(1, 1, "222");
```

#### Returns

`void`

___

### <a id="resumepaint" name="resumepaint"></a> resumePaint

▸ **resumePaint**(): `void`

Resumes the paint.

#### Returns

`void`

___

### <a id="rowfilter" name="rowfilter"></a> rowFilter

▸ **rowFilter**(`value?`): `any`

Gets or sets the row filter for the sheet.

**`example`**
```javascript
//This example creates a row filter.
sheet.rowFilter(new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range(1,1,10,3)));
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `value?` | [`RowFilterBase`](GC.Spread.Sheets.Filter.RowFilterBase) |

#### Returns

`any`

invoking the method without parameter, will return the filter instance, otherwise, return the worksheet instance.

___

### <a id="scroll" name="scroll"></a> scroll

▸ **scroll**(`vPixels`, `hPixels`): `void`

Scrolls the sheet by specified pixels.
When vPixels is positive, worksheet will scroll down; when vPixels is negative, worksheet will scroll up; when vPixels is 0, worksheet won't scroll in vertical direction.
When hPixels is positive, worksheet will scroll right; when hPixels is negative, worksheet will scroll left; when hPixels is 0, worksheet won't scroll in horizontal direction.
When Workbook's option scrollByPixel is true, worksheet will scroll to new top row/left column index and new top row/left column offset;
When Workbook's option scrollByPixel is false, worksheet will scroll to new top row/left column index, and new top row/left column offset will be always 0.

**`example`**
```javascript
//This example scrolls down the sheet 10 pixels and scrolls right the sheet 5 pixels.
activeSheet.scroll(10, 5);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `vPixels` | `number` | The pixels to scroll in vertical direction. |
| `hPixels` | `number` | The pixels to scroll in horizontal direction. |

#### Returns

`void`

___

### <a id="search" name="search"></a> search

▸ **search**(`searchCondition`): [`SearchResult`](GC.Spread.Sheets.Search.SearchResult)

Searches the specified content.

**`example`**
```javascript
//This example uses the search method.
activeSheet.getCell(2,3).value("testSearch");
var searchCondition = new GC.Spread.Sheets.Search.SearchCondition();
searchCondition.searchString = "testSearch";
searchCondition.startSheetIndex = spread.getActiveSheetIndex();
searchCondition.endSheetIndex = spread.getActiveSheetIndex();
searchCondition.searchOrder = GC.Spread.Sheets.Search.SearchOrder.nOrder;
searchCondition.searchTarget = GC.Spread.Sheets.Search.SearchFoundFlags.cellText;
searchCondition.searchFlags = GC.Spread.Sheets.Search.SearchFlags.ignoreCase| GC.Spread.Sheets.Search.SearchFlags.useWildCards;
var searchresult= activeSheet.search(searchCondition);
var str ="[searchFoundFlag:"+ searchresult.searchFoundFlag+",\r\n foundSheetIndex:"+searchresult.foundSheetIndex+",foundRowIndex:" +
searchresult.foundRowIndex+", foundColumnIndex:"+searchresult.foundColumnIndex+", foundString:"+searchresult.foundSheetIndex+"]";
alert(str);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `searchCondition` | [`SearchCondition`](GC.Spread.Sheets.Search.SearchCondition) | The search condition. |

#### Returns

[`SearchResult`](GC.Spread.Sheets.Search.SearchResult)

The search result.

___

### <a id="selectionpolicy" name="selectionpolicy"></a> selectionPolicy

▸ **selectionPolicy**(`value?`): `any`

Gets or sets whether users can select ranges of items on a sheet.

**`example`**
```javascript
//This example uses the selectionPolicy method.
activeSheet.selectionUnit(GC.Spread.Sheets.SelectionUnit.row);
activeSheet.selectionPolicy(GC.Spread.Sheets.SelectionPolicy.range);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `value?` | [`SelectionPolicy`](../enums/GC.Spread.Sheets.SelectionPolicy) |

#### Returns

`any`

If no value is set, returns the selection policy setting; otherwise, returns the sheet.

___

### <a id="selectionunit" name="selectionunit"></a> selectionUnit

▸ **selectionUnit**(`value?`): `any`

Gets or sets whether users can select cells, rows, or columns on a sheet.

**`example`**
```javascript
//This example uses the selectionUnit method.
activeSheet.selectionUnit(GC.Spread.Sheets.SelectionUnit.row);
activeSheet.selectionPolicy(GC.Spread.Sheets.SelectionPolicy.range);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `value?` | [`SelectionUnit`](../enums/GC.Spread.Sheets.SelectionUnit) |

#### Returns

`any`

If no value is set, returns the selection unit setting; otherwise, returns the sheet.

___

### <a id="setactivecell" name="setactivecell"></a> setActiveCell

▸ **setActiveCell**(`row`, `col`): `void`

Sets the active cell for this sheet.

**`example`**
```javascript
//This example sets the active cell.
sheet.setActiveCell(5,5);
alert(sheet.getActiveColumnIndex());
alert(sheet.getActiveRowIndex());
spread.bind(GC.Spread.Sheets.Events.EnterCell, function (event, data) {
    alert(data.col);
    alert(data.row);
  });
spread.bind(GC.Spread.Sheets.Events.LeaveCell, function (event, data) {
    alert(data.col);
    alert(data.row);
  });
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index of the cell. |
| `col` | `number` | The column index of the cell. |

#### Returns

`void`

___

### <a id="setalttext" name="setalttext"></a> setAltText

▸ **setAltText**(`row`, `col`, `value`, `sheetArea?`): `void`

Sets the alternative text for the specified cell in the specified sheet area.

**`example`**
```javascript
var SpreadIcon = {
    FolderOpen: '\ue685',
    InfoFilled: '\ue718',
    Library: '\ue69d',
    NotebookFilled: '\uD800\uDC0F',
    Browse: '\ue626'
};
activeSheet.setValue(1, 1, SpreadIcon.FolderOpen);
activeSheet.setAltText(1, 1, "Folder Open Icon");

// Besides plain text, the alternative text could also contain placeholder {value} or {formatted}, which represents cell value or cell formatted value.
// For example, if the cell value is 1000, and the alt text is "Sales amount is {value}", the final accessible content should be "Sales amount is 1000".
activeSheet.setValue(1, 1, 1000);
activeSheet.setAltText(1, 1, "Sales amount is {value}");
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `value` | `string` | The alternative text to set for the specified cell. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | The sheet area. If this parameter is not provided, it defaults to `viewport`. |

#### Returns

`void`

___

### <a id="setarray" name="setarray"></a> setArray

▸ **setArray**(`row`, `column`, `array`, `setFormula?`): `void`

Sets the values in the specified two-dimensional array of objects into the specified range of cells on this sheet.

**`example`**
```javascript
//This example uses the setArray method.
//set value
var array = [[1,2,3],[4,5],[6,7,8,9]];
activeSheet.setArray(1, 2, array);
//set formula
var array = [["=1+1","=2+2","=3+3"],["=4+4","=5+5"],["=6+6","=7+7","=8+8","=9+9"]];
activeSheet.setArray(1, 2, array, true);
//get value
var newArray = activeSheet.getArray(1, 2, 3, 4);
//getformula
var newArray = activeSheet.getArray(1, 2, 3, 4, true);
//alert(newArray[0]);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `column` | `number` | The column index. |
| `array` | `any`[] | The array from which to set values. |
| `setFormula?` | `boolean` | - |

#### Returns

`void`

___

### <a id="setarrayformula" name="setarrayformula"></a> setArrayFormula

▸ **setArrayFormula**(`row`, `col`, `rowCount`, `colCount`, `value`, `sheetArea?`): `void`

Sets a formula in a specified cell in the specified sheet area.

**`example`**
```javascript
//This example uses the setArrayFormula method.
activeSheet.getCell(1,1).value(3);
activeSheet.getCell(2,1).value(1);
activeSheet.getCell(3,1).value(3);
activeSheet.getCell(4,1).value(7);
activeSheet.getCell(1,2).value(7);
activeSheet.getCell(2,2).value(7);
activeSheet.getCell(3,2).value(7);
activeSheet.getCell(4,2).value(7);
spread.allowUserEditFormula(true);
activeSheet.setArrayFormula(0, 3, 4, 1, "B2:B5*C2:C5", GC.Spread.Sheets.SheetArea.viewport);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The start row index. |
| `col` | `number` | The start column index. |
| `rowCount` | `number` | The number of rows in range. |
| `colCount` | `number` | The number of columns in range. |
| `value` | `string` | The array formula to place in the specified range. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`void`

___

### <a id="setbindingpath" name="setbindingpath"></a> setBindingPath

▸ **setBindingPath**(`row`, `col`, `path`): [`Worksheet`](GC.Spread.Sheets.Worksheet)

Sets the binding path for cell-level binding in a specified cell in the specified sheet area.

**`example`**
```javascript
//This example binds a cell.
var test = {name: "John", gender: "male"};
sheet.setBindingPath(0, 0, "name");
sheet.setBindingPath(0, 1, "gender");
sheet.setDataSource(new GC.Spread.Sheets.Bindings.CellBindingSource(test));
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `path` | `string` | The binding path for the cell binding source. |

#### Returns

[`Worksheet`](GC.Spread.Sheets.Worksheet)

___

### <a id="setcelltype" name="setcelltype"></a> setCellType

▸ **setCellType**(`row`, `col`, `value`, `sheetArea?`): `void`

Sets the cell type.

**`example`**
```javascript
//This example uses the setCellType method.
var cellType = new GC.Spread.Sheets.CellTypes.Button();
cellType.buttonBackColor("#FFFF00");
cellType.text("this is a button");
activeSheet.setCellType(1,1,cellType);
spread.bind(GC.Spread.Sheets.Events.ButtonClicked, function (e, args) {
    var sheet = args.sheet, row = args.row, col = args.col;
    var cellType = activeSheet.getCellType(row, col);
    if (cellType instanceof GC.Spread.Sheets.CellTypes.Button) {
        alert("Button Clicked");
    }
});
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `value` | [`Base`](GC.Spread.Sheets.CellTypes.Base) | The cell type. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`void`

___

### <a id="setcolumncount" name="setcolumncount"></a> setColumnCount

▸ **setColumnCount**(`colCount`, `sheetArea?`, `guardContent?`): `void`

Sets the column count in the specified sheet area.

**`example`**
```javascript
//This example sets the number of columns.
sheet.setRowCount(4,1);
sheet.setColumnCount(4,2);
sheet.addSpan(0,0,3,3,GC.Spread.Sheets.SheetArea.colHeader);
sheet.addSpan(0,0,3,3,GC.Spread.Sheets.SheetArea.rowHeader);
sheet.addSpan(0,0,3,3,GC.Spread.Sheets.SheetArea.viewport);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `colCount` | `number` | The column count. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |
| `guardContent?` | [`UsedRangeType`](../enums/GC.Spread.Sheets.UsedRangeType) | - |

#### Returns

`void`

___

### <a id="setcolumnpagebreak" name="setcolumnpagebreak"></a> setColumnPageBreak

▸ **setColumnPageBreak**(`column`, `value`): `void`

Sets whether a forced page break is inserted before the specified column on this sheet when printing.

**`example`**
```javascript
//This example sets the page break.
activeSheet.setColumnPageBreak(5, true);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `column` | `number` | The column index. |
| `value` | `boolean` | Set to `true` to force a page break before the specified column on this sheet when printing. |

#### Returns

`void`

___

### <a id="setcolumnresizable" name="setcolumnresizable"></a> setColumnResizable

▸ **setColumnResizable**(`col`, `value`, `sheetArea?`): `void`

Sets whether users can resize the specified column in the specified sheet area.

**`example`**
```javascript
//This example sets the setColumnResizable method.
sheet.setRowResizable(3,false,GC.Spread.Sheets.SheetArea.viewport);
sheet.setColumnResizable(3,false,GC.Spread.Sheets.SheetArea.viewport);
sheet.getRange(1,-1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).resizable(false);
sheet.getRange(-1, 1, -1, 1, GC.Spread.Sheets.SheetArea.viewport).resizable(false);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `col` | `number` | The column index. |
| `value` | `boolean` | Set to `true` to allow users to resize the column. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`void`

___

### <a id="setcolumnvisible" name="setcolumnvisible"></a> setColumnVisible

▸ **setColumnVisible**(`col`, `value`, `sheetArea?`): `void`

Sets whether a column in the specified sheet area is displayed.

**`example`**
```javascript
//This example sets the specified column to be hidden.
activeSheet.setColumnVisible(2,false,GC.Spread.Sheets.SheetArea.viewport);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `col` | `number` | The column index. |
| `value` | `boolean` | Whether to display the column. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`void`

___

### <a id="setcolumnwidth" name="setcolumnwidth"></a> setColumnWidth

▸ **setColumnWidth**(`col`, `value`, `sheetArea?`): `void`

Sets the width in pixels or dynamic size for the specified column in the specified sheet area.

**`example`**
```javascript
//This example sets the column width.
sheet.setValue(0, 0, "value");
sheet.addRows(0, 2);
sheet.addColumns(0, 2);
sheet.setRowHeight(0, 50.0, GC.Spread.Sheets.SheetArea.viewport);
sheet.setColumnWidth(0, 150.0, GC.Spread.Sheets.SheetArea.viewport);
sheet.setColumnWidth(1, "2*", GC.Spread.Sheets.SheetArea.viewport);
sheet.getRange(0, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).backColor("Gray");
sheet.getRange(-1, 0, -1, 1, GC.Spread.Sheets.SheetArea.viewport).backColor ("Brown");
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `col` | `number` | The column index. |
| `value` | `string` \| `number` | The width in pixels, or use the string with "*" to represent the dynamic size. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`void`

___

### <a id="setcsv" name="setcsv"></a> setCsv

▸ **setCsv**(`row`, `column`, `text`, `rowDelimiter`, `columnDelimiter`): `void`

Sets delimited text (CSV) in the sheet.

**`property`** {number} row The start row.

**`property`** {number} column The start column.

**`property`** {string} text The delimited text.

**`property`** {string} rowDelimiter The row delimiter.

**`property`** {string} columnDelimiter The column delimiter.

#### Parameters

| Name | Type |
| :------ | :------ |
| `row` | `number` |
| `column` | `number` |
| `text` | `string` |
| `rowDelimiter` | `string` |
| `columnDelimiter` | `string` |

#### Returns

`void`

___

### <a id="setdatasource" name="setdatasource"></a> setDataSource

▸ **setDataSource**(`data`, `reset?`): `void`

Sets the data source that populates the sheet.

**`example`**
```javascript
var test = [
       { "Series0": 2, "Series1": 1 },
       { "Series0": 4, "Series1": 2 },
       { "Series0": 3, "Series1": 4 }
            ];
activeSheet.autoGenerateColumns = true;
activeSheet.setDataSource(test, true);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `data` | `any` | The data source. |
| `reset?` | `boolean` | `true` if the sheet is reset; otherwise, `false`. |

#### Returns

`void`

___

### <a id="setdatavalidator" name="setdatavalidator"></a> setDataValidator

▸ **setDataValidator**(`row`, `col`, `value`, `sheetArea?`): `void`

Sets the cell data validator.

**`example`**
```javascript
spread.options.highlightInvalidData = true;
var dv = GC.Spread.Sheets.DataValidation.createListValidator("1,2,3");
dv.showInputMessage(true);
dv.inputMessage("Value must be 1,2 or 3");
dv.inputTitle("tip");
activeSheet.setDataValidator(1,1,dv,GC.Spread.Sheets.SheetArea.viewport);
alert(activeSheet.getDataValidator(1,1).getValidList(activeSheet,1,1));
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `value` | [`DefaultDataValidator`](GC.Spread.Sheets.DataValidation.DefaultDataValidator) | The data validator. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`void`

▸ **setDataValidator**(`row`, `col`, `rowCount`, `colCount`, `value`, `sheetArea?`): `void`

Sets the cell data validator.

**`example`**
```javascript
spread.options.highlightInvalidData = true;
var dv = GC.Spread.Sheets.DataValidation.createListValidator("1,2,3");
dv.showInputMessage(true);
dv.inputMessage("Value must be 1,2 or 3");
dv.inputTitle("tip");
activeSheet.setDataValidator(1,1,1,1,dv,GC.Spread.Sheets.SheetArea.viewport);
alert(activeSheet.getDataValidator(1,1).getValidList(activeSheet,1,1));
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `rowCount` | `number` | The row count. |
| `colCount` | `number` | The column count. |
| `value` | [`DefaultDataValidator`](GC.Spread.Sheets.DataValidation.DefaultDataValidator) | The data validator. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`void`

___

### <a id="setdefaultstyle" name="setdefaultstyle"></a> setDefaultStyle

▸ **setDefaultStyle**(`style`, `sheetArea?`): `void`

Sets the default style information for the sheet.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `style` | [`Style`](GC.Spread.Sheets.Style) | The style to set. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`void`

___

### <a id="setdefaultvalue" name="setdefaultvalue"></a> setDefaultValue

▸ **setDefaultValue**(`row`, `col`, `value`): `void`

Sets the default value to the cell, it can be the value data or the formula string. It works when the cell has no data.

**`example`**
```javascript
sheet.setDefaultValue(0, 0, "name");
sheet.setDefaultValue(0, 1, "=A1");
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `value` | `any` | The default value of the cell. |

#### Returns

`void`

___

### <a id="setformatter" name="setformatter"></a> setFormatter

▸ **setFormatter**(`row`, `col`, `value`, `sheetArea`): `void`

Sets the cell formatter.

**`example`**
```javascript
//This example sets the format object for the active sheet.
activeSheet.setValue(2, 3, new Date(2011, 2, 9));
activeSheet.setFormatter(2,3,"M",GC.Spread.Sheets.SheetArea.viewport);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `value` | `string` \| [`FormatterBase`](GC.Spread.Formatter.FormatterBase) | The formatter string or object. |
| `sheetArea` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | The sheet area. If this parameter is not provided, it defaults to `viewport`. |

#### Returns

`void`

___

### <a id="setformula" name="setformula"></a> setFormula

▸ **setFormula**(`row`, `col`, `value`, `sheetArea?`): `void`

Sets a formula in a specified cell in the specified sheet area.

**`example`**
```javascript
// This example sets the formula for the specified cell.
activeSheet.setValue(0, 2, 3);
activeSheet.setFormula(1, 1, "C1+D1");

// This example clears the formula in the specified cell.
activeSheet.setFormula(1, 1, null);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `value` | ``null`` \| `string` | The formula to place in the specified cell. If `null`, the formula in the cell will be cleared. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`void`

___

### <a id="sethyperlink" name="sethyperlink"></a> setHyperlink

▸ **setHyperlink**(`row`, `col`, `value`, `sheetArea?`): `void`

Sets the hyperlink data for the specified cell in the specified sheet area.

**`example`**
```javascript
//This example uses the setHyperlink method.
sheet.setHyperlink(0, 2, {
    url: 'https://www.spreadjs.com',
    tooltip: 'spreadjs',
    linkColor: 'blue',
    visitedLinkColor: 'red',
    target: GC.Spread.Sheets.Hyperlink.HyperlinkTargetType.blank,
    command: 'navigationLeft'
});
sheet.setValue(0,2, 'spreadjs');
sheet.setHyperlink(1, 1, {
    url: 'https://www.spreadjs.com',
    tooltip: 'spreadjs',
    target: GC.Spread.Sheets.Hyperlink.HyperlinkTargetType.top,
    command: function () { console.log('Only show this message when click the hyperlink.') }
});
sheet.setValue(1,1, 'spreadjs');
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `value` | [`IHyperlink`](../interfaces/GC.Spread.Sheets.IHyperlink) | The hyperlink data to set for the specified cell. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | The sheet area. If this parameter is not provided, it defaults to `viewport`. |

#### Returns

`void`

___

### <a id="setrowcount" name="setrowcount"></a> setRowCount

▸ **setRowCount**(`rowCount`, `sheetArea?`, `guardContent?`): `void`

Sets the row count in the specified sheet area.

**`example`**
```javascript
//This example sets the row count.
sheet.setRowCount(4,1);
sheet.setColumnCount(4,2);
sheet.addSpan(0,0,3,3,GC.Spread.Sheets.SheetArea.colHeader);
sheet.addSpan(0,0,3,3,GC.Spread.Sheets.SheetArea.rowHeader);
sheet.addSpan(0,0,3,3,GC.Spread.Sheets.SheetArea.viewport);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `rowCount` | `number` | The row count. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |
| `guardContent?` | [`UsedRangeType`](../enums/GC.Spread.Sheets.UsedRangeType) | - |

#### Returns

`void`

___

### <a id="setrowheight" name="setrowheight"></a> setRowHeight

▸ **setRowHeight**(`row`, `value`, `sheetArea?`): `void`

Sets the height in pixels or dynamic size for the specified row in the specified sheet area.

**`example`**
```javascript
//This example sets the row height.
sheet.setValue(0, 0, "value");
sheet.addRows(0, 2);
sheet.addColumns(0, 2);
sheet.setRowHeight(0, 50.0, GC.Spread.Sheets.SheetArea.viewport);
sheet.setRowHeight(1, "3*", GC.Spread.Sheets.SheetArea.viewport);
sheet.setColumnWidth(0, 150.0, GC.Spread.Sheets.SheetArea.viewport);
sheet.getRange(0, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).backColor("Gray");
sheet.getRange(-1, 0, -1, 1, GC.Spread.Sheets.SheetArea.viewport).backColor ("Brown");
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `value` | `string` \| `number` | The height in pixels, or use the string with "*" to represent the dynamic size. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`void`

___

### <a id="setrowpagebreak" name="setrowpagebreak"></a> setRowPageBreak

▸ **setRowPageBreak**(`row`, `value`): `void`

Sets whether a forced page break is inserted before the specified row on this sheet when printing.

**`example`**
```javascript
activeSheet.setRowPageBreak(3, true);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `value` | `boolean` | Set to `true` to force a page break before the specified row on this sheet when printing. |

#### Returns

`void`

___

### <a id="setrowresizable" name="setrowresizable"></a> setRowResizable

▸ **setRowResizable**(`row`, `value`, `sheetArea?`): `void`

Sets whether users can resize the specified row in the specified sheet area.

**`example`**
```javascript
//This example prevents certain rows and columns from being resized.
sheet.setRowResizable(3,false,GC.Spread.Sheets.SheetArea.viewport);
sheet.setColumnResizable(3,false,GC.Spread.Sheets.SheetArea.viewport);
sheet.getRange(1,-1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).resizable(false);
sheet.getRange(-1, 1, -1, 1, GC.Spread.Sheets.SheetArea.viewport).resizable(false);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `value` | `boolean` | Set to `true` to let the users resize the specified row. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`void`

___

### <a id="setrowvisible" name="setrowvisible"></a> setRowVisible

▸ **setRowVisible**(`row`, `value`, `sheetArea?`): `void`

Sets whether the control displays the specified row in the specified sheet area.

**`example`**
```javascript
//This example sets the specified row to be hidden.
activeSheet.setRowVisible(1,false,GC.Spread.Sheets.SheetArea.viewport);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `value` | `boolean` | Set to `true` to display the specified row. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`void`

___

### <a id="setselection" name="setselection"></a> setSelection

▸ **setSelection**(`row`, `column`, `rowCount`, `columnCount`): `void`

Sets the selection to a cell or a range and sets the active cell to the first cell.

**`example`**
```javascript
//This example selects a range of cells.
sheet.setValue(0,0, 1,3);
sheet.setValue(1,0, 50,3);
sheet.setValue(2,0, 100,3);
sheet.setValue(3,0, 2,3);
sheet.setValue(4,0, 60,3);
sheet.setValue(5,0, 90,3);
sheet.setValue(6,0, 3,3);
sheet.setValue(7,0, 40,3);
sheet.setValue(8,0, 70,3);
sheet.setValue(9,0, 5,3);
sheet.setValue(10,0, 35,3);
sheet.setSelection(0,0,11,1);
sheet.conditionalFormats.add3ScaleRule(1, 10, "red", 0, 50, "blue",2, 100, "yellow", sheet.getSelections());
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index of the first cell to add. |
| `column` | `number` | The column index of the first cell to add. |
| `rowCount` | `number` | The number of rows to add. |
| `columnCount` | `number` | The number of columns to add. |

#### Returns

`void`

___

### <a id="setsparkline" name="setsparkline"></a> setSparkline

▸ **setSparkline**(`row`, `col`, `dataRange`, `dataOrientation`, `sparklineType`, `sparklineSetting`, `dateAxisRange?`, `dateAxisOrientation?`): [`Sparkline`](GC.Spread.Sheets.Sparklines.Sparkline)

Sets the sparkline for a cell.

**`example`**
```javascript
//This example creates a sparkline for the specified range.
var data = new GC.Spread.Sheets.Range(1, 0, 8, 1);
var setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
setting.options.showMarkers = true;
setting.options.lineWeight = 3;
setting.options.displayXAxis = true;
setting.options.showFirst = true;
setting.options.showLast = true;
setting.options.showLow = true;
setting.options.showHigh = true;
setting.options.showNegative = true;
setting.options.seriesColor = "Text 2 1";
setting.options.firstMarkerColor = "Text 2 3";
setting.options.negativeColor = "Accent 2 1";
setting.options.markersColor = "Accent 3 1";
setting.options.lowMarkerColor = "Accent 4 1";
setting.options.highMarkerColor = "Accent 6 1";
setting.options.lastMarkerColor = "Accent 6 6";
setting.options.axisColor ="Text 1 1";
sheet.addSpan(13, 0, 4, 3, null);
sheet.setSparkline(13, 0, data, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
sheet.setValue(1, 0, 1);
sheet.setValue(2, 0, -2);
sheet.setValue(3, 0, -1);
sheet.setValue(4, 0, 6);
sheet.setValue(5, 0, 4);
sheet.setValue(6, 0, -4);
sheet.setValue(7, 0, 3);
sheet.setValue(8, 0, 8);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `dataRange` | `string` \| [`Range`](GC.Spread.Sheets.Range) | The data range. |
| `dataOrientation` | [`DataOrientation`](../enums/GC.Spread.Sheets.Sparklines.DataOrientation) | The data orientation. |
| `sparklineType` | [`SparklineType`](../enums/GC.Spread.Sheets.Sparklines.SparklineType) | The sparkline type. |
| `sparklineSetting` | [`SparklineSetting`](GC.Spread.Sheets.Sparklines.SparklineSetting) | The sparkline setting. |
| `dateAxisRange?` | `string` \| [`Range`](GC.Spread.Sheets.Range) | The date axis range. |
| `dateAxisOrientation?` | [`DataOrientation`](../enums/GC.Spread.Sheets.Sparklines.DataOrientation) | The date axis range orientation. |

#### Returns

[`Sparkline`](GC.Spread.Sheets.Sparklines.Sparkline)

The sparkline.

___

### <a id="setstyle" name="setstyle"></a> setStyle

▸ **setStyle**(`row`, `col`, `value`, `sheetArea?`): `void`

Sets the style information for a specified cell in the specified sheet area.

**`example`**
```javascript
//This example uses the setStyle method.
var style = new GC.Spread.Sheets.Style();
style.backColor = "lightgreen";
style.backgroundImage = "./css/images/quarter1.png";
activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | - |
| `value` | [`Style`](GC.Spread.Sheets.Style) | The cell style. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`void`

___

### <a id="setstylename" name="setstylename"></a> setStyleName

▸ **setStyleName**(`row`, `column`, `value`, `sheetArea?`): `void`

Sets the specified style name for a specified cell in the specified sheet area.

**`example`**
```javascript
var namedStyle = new GC.Spread.Sheets.Style();
namedStyle.name = "style1";
namedStyle.backColor = "green";
activeSheet.addNamedStyle(namedStyle);
activeSheet.setStyleName(1, 1, "style1"); // cell(1,1)'s backColor is  green.
activeSheet.setStyleName(2, 1, "style1");
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `column` | `number` | The column index. |
| `value` | `string` | The name of the style to set. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`void`

___

### <a id="settag" name="settag"></a> setTag

▸ **setTag**(`row`, `col`, `tag`, `sheetArea?`): `void`

Sets the tag value for the specified cell in the specified sheet area.

**`example`**
```javascript
activeSheet.setTag(1,1,"test");
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `tag` | `any` | The tag value to set for the specified cell. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | The sheet area without corner. If this parameter is not provided, it defaults to `viewport`. |

#### Returns

`void`

___

### <a id="settext" name="settext"></a> setText

▸ **setText**(`row`, `col`, `value`, `sheetArea?`): `void`

Sets the formatted text in the cell in the specified sheet area.

**`example`**
```javascript
activeSheet.setText(1, 0, "10");
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `value` | `string` | The text for the specified cell. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |

#### Returns

`void`

___

### <a id="setvalue" name="setvalue"></a> setValue

▸ **setValue**(`row`, `col`, `value`, `sheetArea?`, `ignoreRecalc?`): `void`

Sets the value for the specified cell in the specified sheet area.

**`example`**
```javascript
//This example uses the setValue method.
sheet.setValue(0,2,"ColumnHeader", GC.Spread.Sheets.SheetArea.colHeader);
sheet.setValue(2,0,{richText:[{style:{font:'bold 24px Arial'},text:'SpreadJS'}]}, GC.Spread.Sheets.SheetArea.rowHeader);
sheet.setValue(1, 1, {richText:[{style:{vertAlign: GC.Spread.Sheets.VertAlign.subscript},text:'SpreadJS'}]}, GC.Spread.Sheets.SheetArea.viewport);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `value` | `any` | The value to set for the specified cell. if the value is rich text format, should include a richText field which type is a rich text style array. |
| `sheetArea?` | [`SheetArea`](../enums/GC.Spread.Sheets.SheetArea) | - |
| `ignoreRecalc?` | `boolean` | Whether to ignore recalculation. |

#### Returns

`void`

___

### <a id="showcell" name="showcell"></a> showCell

▸ **showCell**(`row`, `col`, `verticalPosition`, `horizontalPosition`): `void`

Moves the view of a cell to the specified position in the viewport.

**`example`**
```javascript
//This example uses the showCell method.
//Set cell (3,3) as the active cell
activeSheet.setActiveCell(3, 3);
//Display the active cell at top left
activeSheet.showCell(3, 3, GC.Spread.Sheets.VerticalPosition.top, GC.Spread.Sheets.HorizontalPosition.left);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `col` | `number` | The column index. |
| `verticalPosition` | [`VerticalPosition`](../enums/GC.Spread.Sheets.VerticalPosition) | The vertical position in which to display the cell. |
| `horizontalPosition` | [`HorizontalPosition`](../enums/GC.Spread.Sheets.HorizontalPosition) | The horizontal position in which to display the cell. |

#### Returns

`void`

___

### <a id="showcolumn" name="showcolumn"></a> showColumn

▸ **showColumn**(`col`, `horizontalPosition`): `void`

Moves the view of a column to the specified position in the viewport.

**`example`**
```javascript
activeSheet.showColumn(9, GC.Spread.Sheets.HorizontalPosition.left);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `col` | `number` | The column index. |
| `horizontalPosition` | [`HorizontalPosition`](../enums/GC.Spread.Sheets.HorizontalPosition) | The horizontal position in which to display the column. |

#### Returns

`void`

___

### <a id="showcolumnoutline" name="showcolumnoutline"></a> showColumnOutline

▸ **showColumnOutline**(`value?`): `any`

Gets or sets whether the column outline (range group) is visible.

**`example`**
```javascript
//This example uses the showColumnOutline method.
activeSheet.showColumnOutline(false);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` | Whether to display the column outline. |

#### Returns

`any`

If no value is set, returns a value that indicates whether the column outline is displayed on this sheet; otherwise, returns the worksheet.

___

### <a id="showrow" name="showrow"></a> showRow

▸ **showRow**(`row`, `verticalPosition`): `void`

Moves the view of a row to the specified position in the viewport.

**`example`**
```javascript
activeSheet.showRow(9, GC.Spread.Sheets.VerticalPosition.top);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The row index. |
| `verticalPosition` | [`VerticalPosition`](../enums/GC.Spread.Sheets.VerticalPosition) | The vertical position in which to display the row. |

#### Returns

`void`

___

### <a id="showrowoutline" name="showrowoutline"></a> showRowOutline

▸ **showRowOutline**(`value?`): `any`

Gets or sets whether the row outline (range group) is visible.

**`example`**
```javascript
//This example uses the showRowOutline method.
activeSheet.showRowOutline(false);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` | Whether to display the row outline. |

#### Returns

`any`

If no value is set, returns a value that indicates whether the row outline is displayed on this sheet; otherwise, returns the worksheet.

___

### <a id="sortrange" name="sortrange"></a> sortRange

▸ **sortRange**(`row`, `column`, `rowCount`, `columnCount`, `byRows`, `sortInfo`, `sortOption?`): `boolean`

Sorts a range of cells in this sheet in the data model.

**`example`**
```javascript
//This example sorts a range.
sheet.setValue(0,0,"112");
sheet.setValue(1,0,"10");
sheet.setValue(2,0,"223");
sheet.setValue(3,0,"20");
sheet.setValue(4,0,"334");
sheet.setValue(5,0,"30");
function pinyinCompare (obj1, obj2) {
    return obj1.toString().localeCompare(obj2.toString(), 'zh');
}
sheet.sortRange(0, 0, 6, 1, true, [
                {index:0, ascending:true, compareFunction: pinyinCompare}
                ], {groupSort: GC.Spread.Sheets.GroupSort.full, ignoreHidden: true});
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `row` | `number` | The index of the starting row of the block of cells to sort. |
| `column` | `number` | The index of the starting column of the block of cells to sort. |
| `rowCount` | `number` | The number of rows in the block of cells. |
| `columnCount` | `number` | The number of columns in the block of cells. |
| `byRows` | `boolean` | Set to `true` to sort by rows, and `false` to sort by columns. |
| `sortInfo` | ([`IValueSortInfo`](../interfaces/GC.Spread.Sheets.IValueSortInfo) \| [`ICellColorSortInfo`](../interfaces/GC.Spread.Sheets.ICellColorSortInfo) \| [`IFontColorSortInfo`](../interfaces/GC.Spread.Sheets.IFontColorSortInfo) \| [`ICustomSortInfo`](../interfaces/GC.Spread.Sheets.ICustomSortInfo))[] | The SortInfo object with sort criteria and information about how to perform the sort. For example, [{index:0,ascending:true}] |
| `sortOption?` | [`ISortOptions`](../interfaces/GC.Spread.Sheets.ISortOptions) | The sortOption indicate the detail performance of the sort. |

#### Returns

`boolean`

`true` if the data is sorted successfully; otherwise, `false`.

___

### <a id="startedit" name="startedit"></a> startEdit

▸ **startEdit**(`selectAll?`, `defaultText?`): `void`

Starts to edit the cell.

**`example`**
```javascript
//This example uses the startEdit method.
activeSheet.setActiveCell(5,5);
activeSheet.startEdit(true, "Test");
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `selectAll?` | `boolean` | Set to `true` to select all the text in the cell. |
| `defaultText?` | `string` | The default text to display while editing the cell. |

#### Returns

`void`

___

### <a id="suspendcalcservice" name="suspendcalcservice"></a> suspendCalcService

▸ **suspendCalcService**(`ignoreDirty?`): `void`

Suspends the calculation service.

**`example`**
```javascript
//This example uses the suspendCalcService method.
activeSheet.suspendCalcService(false);
activeSheet.setValue(0,0,1);
activeSheet.setValue(0,1,2);
activeSheet.setValue(0,2,10);
activeSheet.getCell(1,1).formula("=SUM(A1:C1)");
activeSheet.resumeCalcService(true);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `ignoreDirty?` | `boolean` | Specifies whether to invalidate the dependency cells. |

#### Returns

`void`

___

### <a id="suspenddirty" name="suspenddirty"></a> suspendDirty

▸ **suspendDirty**(): `void`

Suspends recording the dirty data.

**`example`**
```javascript
//This example uses the suspendDirty method.
 var customers = [
               { ID: 0, Name: 'A', Info1: 'Info0' },
               { ID: 1, Name: 'B', Info1: 'Info1' },
               { ID: 2, Name: 'C', Info1: 'Info2' },
            ];
activeSheet.setDataSource(customers);
activeSheet.suspendDirty();
alert(activeSheet.isDirtySuspended());
activeSheet.resumeDirty();
alert(activeSheet.isDirtySuspended());
```

#### Returns

`void`

___

### <a id="suspendevent" name="suspendevent"></a> suspendEvent

▸ **suspendEvent**(): `void`

Suspends the event.

**`example`**
```javascript
//This example suspends and resumes the event.
activeSheet.bind(GC.Spread.Sheets.Events.CellChanged, function (sender, args) {
    if (args.propertyName === "value") {
        alert(activeSheet.getValue(args.row, args.col));
    }
});
activeSheet.suspendEvent();
activeSheet.setValue(0, 0, "111");
activeSheet.resumeEvent();
activeSheet.setValue(1, 1, "222");
```

#### Returns

`void`

___

### <a id="suspendpaint" name="suspendpaint"></a> suspendPaint

▸ **suspendPaint**(): `void`

Suspends the paint.

#### Returns

`void`

___

### <a id="tag" name="tag"></a> tag

▸ **tag**(`value?`): `any`

Gets or sets the tag value for the current sheet.

**`example`**
```javascript
//This example sets the sheet tag.
activeSheet.tag("test");
alert(activeSheet.tag());
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `any` | The tag value to set for the current sheet. |

#### Returns

`any`

If no value is set, returns the tag value of the current sheet; otherwise, returns the worksheet.

___

### <a id="tojson" name="tojson"></a> toJSON

▸ **toJSON**(`serializationOption?`): `Object`

Saves the object state to a JSON string.

**`example`**
```javascript
//This example uses the toJSON method.
activeSheet.getCell(0,0).value(123);
var jsonStr = null;
//export
jsonStr = JSON.stringify(activeSheet.toJSON());
//import
activeSheet.fromJSON(JSON.parse(jsonStr));
alert(jsonStr);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `serializationOption?` | `Object` | Serialization option that contains the <i>includeBindingSource</i> argument. See the Remarks for more information. |

#### Returns

`Object`

The sheet data.

___

### <a id="unbind" name="unbind"></a> unbind

▸ **unbind**(`type`, `fn?`): `void`

Removes the binding of an event to the sheet.

**`example`**
```javascript
//This example unbinds the event after setting the first value.
activeSheet.bind(GC.Spread.Sheets.Events.CellChanged, function (sender, args) {
    if (args.propertyName === "value") {
        alert(activeSheet.getValue(args.row, args.col));
    }
});
activeSheet.setValue(0, 0, "111");
activeSheet.unbind(GC.Spread.Sheets.Events.CellChanged);
activeSheet.setValue(1, 0, "222");
activeSheet.setValue(2, 0, "333");
activeSheet.setValue(3, 0, "444");
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `type` | `string` | The event type. |
| `fn?` | `Function` | Specifies the function for which to remove the binding. |

#### Returns

`void`

___

### <a id="unbindall" name="unbindall"></a> unbindAll

▸ **unbindAll**(): `void`

Removes the binding of all events to the sheet.

**`example`**
```javascript
//This example cancels monitoring of all events.
activeSheet.bind(GC.Spread.Sheets.Events.CellChanged, function (sender, args) {
    if (args.propertyName === "value") {
        alert(activeSheet.getValue(args.row, args.col));
    }
});
activeSheet.setValue(0, 0, "111");
activeSheet.unbindAll(); //cancel monitoring of all events.
activeSheet.setValue(1, 0, "222");
activeSheet.setValue(2, 0, "333");
activeSheet.setValue(3, 0, "444");
```

#### Returns

`void`

___

### <a id="ungroupsparkline" name="ungroupsparkline"></a> ungroupSparkline

▸ **ungroupSparkline**(`group`): `void`

Ungroups the sparklines in the specified group.

**`example`**
```javascript
//This example uses the ungroupSparkline method.
activeSheet.setValue(0, 0, "Data Range is A2-A9");
activeSheet.setValue(1, 0, 1);
activeSheet.setValue(2, 0, -2);
activeSheet.setValue(3, 0, -1);
activeSheet.setValue(4, 0, 6);
activeSheet.setValue(5, 0, 4);
activeSheet.setValue(6, 0, -4);
activeSheet.setValue(7, 0, 3);
activeSheet.setValue(8, 0, 8);
var data = new GC.Spread.Sheets.Range(1, 0, 8, 1);
var setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
var s1=  activeSheet.setSparkline(11, 0, data, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
var s2 =activeSheet.setSparkline(11, 3, data, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.column, setting);
var s3=  activeSheet.setSparkline(11, 6, data, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.winloss, setting);
var group = activeSheet.groupSparkline([s1,s2,s3]);
//activeSheet.ungroupSparkline(group);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `group` | [`SparklineGroup`](GC.Spread.Sheets.Sparklines.SparklineGroup) | The sparkline group. |

#### Returns

`void`

___

### <a id="unprotect" name="unprotect"></a> unprotect

▸ **unprotect**(`password?`): `boolean`

Unprotects a worksheet.

**`property`** {string} password Sheet protection password.

**`example`**
```javascript
let password = "fe4c4be8"
sheet.protect(password);
sheet.unprotect(password);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `password?` | `string` |

#### Returns

`boolean`

Return true if password is correct or isProtect is false, otherwise return false.

___

### <a id="visible" name="visible"></a> visible

▸ **visible**(`value?`): `any`

Sets whether the worksheet is displayed.

**`example`**
```javascript
activeSheet.visible(false);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `value?` | `boolean` \| [`SheetTabVisible`](../enums/GC.Spread.Sheets.SheetTabVisible) |

#### Returns

`any`

If you call this function without a parameter, it returns a boolean indicating whether the sheet is visible;
otherwise, it returns the current worksheet object.

___

### <a id="zoom" name="zoom"></a> zoom

▸ **zoom**(`factor?`): `any`

Gets or sets the zoom factor for the sheet.

**`example`**
```javascript
//This example zooms the sheet.
spread.options.allowUserZoom = false;
sheet.zoom(3);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `factor?` | `number` |

#### Returns

`any`

If no value is set, returns the zoom factor; otherwise, returns the worksheet.
