# AnalyticsSource Interface

> AnalyticsSource interface in the Node.js TypeScript API: A worksheet table/name/range binding, or a logical server connector query without a worksheet.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Interface
- **Path:** TX Sheet Control > API Reference > TypeScript API > Node.js Server > AnalyticsSource Interface
- **776 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/analyticssource/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/analyticssource/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/analyticssource/llms-full.txt

---

A worksheet table/name/range binding, or a logical server connector query without a worksheet.

Package: `@txtextcontrol/tx-sheet-control-server`. Version: **2.0.0**.

Related workbook object-model type, returned through the server control. Obtain it from its owning workbook or collection; it is not a required browser-package import.

### Members

#### Properties

| Property | Description |
|---|---|
| [connectionId](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/analyticssource/connectionid-property/llms-full.txt) | Logical server-side query identity. No credentials, SQL or fetched rows are persisted. |
| [hasHeaderRow](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/analyticssource/hasheaderrow-property/llms-full.txt) | The hasHeaderRow value of AnalyticsSource. |
| [id](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/analyticssource/id-property/llms-full.txt) | The id value of AnalyticsSource. |
| [name](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/analyticssource/name-property/llms-full.txt) | The name value of AnalyticsSource. |
| [namedRange](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/analyticssource/namedrange-property/llms-full.txt) | The namedRange value of AnalyticsSource. |
| [queryId](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/analyticssource/queryid-property/llms-full.txt) | The queryId value of AnalyticsSource. |
| [range](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/analyticssource/range-property/llms-full.txt) | The range value of AnalyticsSource. |
| [sheetId](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/analyticssource/sheetid-property/llms-full.txt) | The sheetId value of AnalyticsSource. |
| [tableId](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/analyticssource/tableid-property/llms-full.txt) | The tableId value of AnalyticsSource. |

### Examples

Create sample data and obtain this detached result from the owning document. Return the selected data to the report or application UI.

```typescript
import type { ServerSheetControl } from '@txtextcontrol/tx-sheet-control-server';

function createAnalyticsSourceReport(control: ServerSheetControl) {
    const book = control.workbook;
    const sheet = book.sheets.at(0);
    sheet.range('A1:B5').setValues([
        ['Region', 'Revenue'],
        ['North', 42000],
        ['South', 38500],
        ['East', 31200],
        ['West', 44900],
    ]);

    book.analytics.setSource({
        id: 'sales',
        name: 'Regional sales',
        sheetId: sheet.id,
        range: 'A1:B5',
        hasHeaderRow: true,
    });

    const result = book.analytics.sources()[0];
    return result;
}
```

### See Also

- [TypeScript Node.js Server API](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/llms-full.txt)
- [Creating Dashboards](https://docs.textcontrol.com/tx-sheet-control/dashboards/creating/llms-full.txt)

---

## In This Section

- [AnalyticsSource.connectionId Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/analyticssource/connectionid-property/llms-full.txt): AnalyticsSource.connectionId property in the TX Sheet Control TypeScript API for Node.js: Logical server-side query identity.
- [AnalyticsSource.hasHeaderRow Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/analyticssource/hasheaderrow-property/llms-full.txt): AnalyticsSource.hasHeaderRow property in the TX Sheet Control TypeScript API for Node.js, with its type boolean | undefined and a TypeScript example.
- [AnalyticsSource.id Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/analyticssource/id-property/llms-full.txt): AnalyticsSource.id property in the TX Sheet Control TypeScript API for Node.js, with its type string and a TypeScript example.
- [AnalyticsSource.name Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/analyticssource/name-property/llms-full.txt): AnalyticsSource.name property in the TX Sheet Control TypeScript API for Node.js, with its type string and a TypeScript example.
- [AnalyticsSource.namedRange Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/analyticssource/namedrange-property/llms-full.txt): AnalyticsSource.namedRange property in the TX Sheet Control TypeScript API for Node.js, with its type string | undefined and a TypeScript example.
- [AnalyticsSource.queryId Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/analyticssource/queryid-property/llms-full.txt): AnalyticsSource.queryId property in the TX Sheet Control TypeScript API for Node.js, with its type string | undefined and a TypeScript example.
- [AnalyticsSource.range Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/analyticssource/range-property/llms-full.txt): AnalyticsSource.range property in the TX Sheet Control TypeScript API for Node.js, with its type string | undefined and a TypeScript example.
- [AnalyticsSource.sheetId Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/analyticssource/sheetid-property/llms-full.txt): AnalyticsSource.sheetId property in the TX Sheet Control TypeScript API for Node.js, with its type string | undefined and a TypeScript example.
- [AnalyticsSource.tableId Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/analyticssource/tableid-property/llms-full.txt): AnalyticsSource.tableId property in the TX Sheet Control TypeScript API for Node.js, with its type string | undefined and a TypeScript example.

---

## Nearby

- **Previous:** [AnalyticsResult.rows Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/analyticsresult/rows-property/llms-full.txt)
- **Next:** [AnalyticsSource.connectionId Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/analyticssource/connectionid-property/llms-full.txt)
