Class Sheet
A sheet in a spreadsheet.
Inherited Members
Namespace: StansAssets.GoogleDoc
Assembly: cs.temp.dll.dll
Syntax
public class Sheet : SheetMetadata
Properties
NamedRanges
The named ranges defined in a sheet.
Declaration
public IEnumerable<NamedRange> NamedRanges { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<NamedRange> |
Rows
Sheet Rows are zero-based
Declaration
public IEnumerable<RowData> Rows { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<RowData> |
Methods
GetCell(Int32, Int32)
Gets cell from specified row and column
Declaration
public Cell GetCell(int row, int column)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | row | Row index. Index starts from 0 |
| System.Int32 | column | Column index. Index starts from 0 |
Returns
| Type | Description |
|---|---|
| Cell | Cell object or cell with empty cell value if cell wasn't found. |
GetCell(String)
Get sell by name. For example "A1" or "B5" Attention: When transferring information, the site api ignores empty cells (but the lines remain unchanged, even if all its cells are empty). Therefore, the reference to the cell name will differ from the name on the site (for the cell name to match the name on the site, the table must be filled with data without blank cells)
Declaration
public Cell GetCell(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name of the cell. |
Returns
| Type | Description |
|---|---|
| Cell | Cell object or cell with empty cell value if cell wasn't found. |
GetCellValue<T>(Int32, Int32)
Declaration
public T GetCellValue<T>(int row, int column)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | row | |
| System.Int32 | column |
Returns
| Type | Description |
|---|---|
| T |
Type Parameters
| Name | Description |
|---|---|
| T |
GetCellValue<T>(String)
Gets converted cell value by name. For example "A1" or "B5". See GetValue<T>() for more info.
Declaration
public T GetCellValue<T>(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name of the cell. |
Returns
| Type | Description |
|---|---|
| T | Converted value. |
Type Parameters
| Name | Description |
|---|---|
| T | Type you want to convert a value to. |
GetColumn(Int32)
Returns all the cells in the column.
Declaration
public List<Cell> GetColumn(int column)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | column | Column index. Index starts from 0 |
Returns
| Type | Description |
|---|---|
| List<Cell> | Cells List. |
GetColumn(String)
Returns all the cells in the column.
Declaration
public List<Cell> GetColumn(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name of the column. |
Returns
| Type | Description |
|---|---|
| List<Cell> | Cells List. |
GetColumnValues<T>(Int32)
Returns all the converted cells value in the column. See GetValue<T>() for more info.
Declaration
public List<T> GetColumnValues<T>(int column)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | column | Column index. Index starts from 0 |
Returns
| Type | Description |
|---|---|
| List<T> | Converted cells value |
Type Parameters
| Name | Description |
|---|---|
| T | Type you want to convert a value to. |
GetColumnValues<T>(String)
Returns all the converted cells value by name. For example "A" or "B". See GetValue<T>() for more info.
Declaration
public List<T> GetColumnValues<T>(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name of the column. |
Returns
| Type | Description |
|---|---|
| List<T> | Converted cells value |
Type Parameters
| Name | Description |
|---|---|
| T | Type you want to convert a value to. |
GetNamedRange(String)
Returns NamedRange with provided name
Declaration
public NamedRange GetNamedRange(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Name of Named Range to search for |
Returns
| Type | Description |
|---|---|
| NamedRange | NamedRange if the element with provided name exists, otherwise null |
GetNamedRangeCells(String)
Returns a list of Cell objects of the requested Named Range.
Declaration
public List<Cell> GetNamedRangeCells(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Name of the requested Named Range |
Returns
| Type | Description |
|---|---|
| List<Cell> |
GetNamedRangeValues<T>(String)
Returns all the converted cells value of the requested Named Range. See GetValue<T>() for more info.
Declaration
public List<T> GetNamedRangeValues<T>(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Name of the requested Named Range |
Returns
| Type | Description |
|---|---|
| List<T> | Returns all the converted cells |
Type Parameters
| Name | Description |
|---|---|
| T | Type you want to convert a value to. |
GetRange(GridRange)
Returns all the cells in the range.
Declaration
public List<Cell> GetRange(GridRange range)
Parameters
| Type | Name | Description |
|---|---|---|
| GridRange | range | range consist of 2 point(start of range and end of range) |
Returns
| Type | Description |
|---|---|
| List<Cell> | Cells List. |
GetRange(String)
Returns all the cells in the range.
Example-
- A1:B2
- A:B
- 1:2
Declaration
public List<Cell> GetRange(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name of the range |
Returns
| Type | Description |
|---|---|
| List<Cell> | Cells List. |
GetRow(Int32)
Returns all the cells in the row.
Declaration
public List<Cell> GetRow(int row)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | row | Row index. Index starts from 0 |
Returns
| Type | Description |
|---|---|
| List<Cell> | Cells List. |
GetRowValues<T>(Int32)
Returns all the cells converted values in the row. See GetValue<T>() for more info.
Declaration
public List<T> GetRowValues<T>(int row)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | row | Row index. Index starts from 0 |
Returns
| Type | Description |
|---|---|
| List<T> | Converted cells value |
Type Parameters
| Name | Description |
|---|---|
| T | Type you want to convert a value to. |
HasNamedRange(String)
Determines whether an element is in the sheet
Declaration
public bool HasNamedRange(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Name of Named Range to search |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the element is in the sheet; otherwise, false |