> For the complete documentation index, see [llms.txt](https://boxlang.ortusbooks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://boxlang.ortusbooks.com/boxlang-+-++/modules/bx-spreadsheet/built-in-functions/isspreadsheetobject.md).

# IsSpreadsheetObject

Determines whether an object is a BoxLang spreadsheet object.

## Method Signature

```
IsSpreadsheetObject(object=[any])
```

### Arguments

| Argument | Type  | Required | Description         | Default |
| -------- | ----- | -------- | ------------------- | ------- |
| `value`  | `ANY` | `true`   | The value to check. |         |

## Examples

Check if a value is a spreadsheet object:

```js
// Check if variable is a spreadsheet
var spreadsheet = SpreadsheetNew();
if ( IsSpreadsheetObject( spreadsheet ) ) {
    println( "This is a valid spreadsheet object" );
}
```

Validate before operations:

```js
// Ensure object is spreadsheet before manipulating
var data = SpreadsheetRead( "/path/to/file.xlsx" );

if ( !IsSpreadsheetObject( data ) ) {
    throw( "Invalid spreadsheet object" );
}

SpreadsheetAddRow( data, [ "Name", "Age" ] );
```

Type validation in functions:

```js
// Type check in utility function
function processSpreadsheet( spreadsheetObj ) {
    if ( !IsSpreadsheetObject( spreadsheetObj ) ) {
        return { success = false, error = "Expected spreadsheet object" };
    }

    // Safe to process
    return { success = true, rows = SpreadsheetGetColumnCount( spreadsheetObj ) };
}
```

## Related

* [IsSpreadsheetFile()](/boxlang-+-++/modules/bx-spreadsheet/built-in-functions/isspreadsheetfile.md) - Check for SpreadsheetFile objects
* [SpreadsheetNew()](/boxlang-+-++/modules/bx-spreadsheet/built-in-functions/spreadsheetnew.md) - Create a spreadsheet
* [SpreadsheetInfo()](/boxlang-+-++/modules/bx-spreadsheet/built-in-functions/spreadsheetinfo.md) - Get spreadsheet information
* [Type Checking Guide](https://github.com/ortus-boxlang/boxlang-docs/blob/v1.x/boxlang-framework/boxlang-plus/modules/bx-spreadsheet/type-checking.md) - BoxLang type validation


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://boxlang.ortusbooks.com/boxlang-+-++/modules/bx-spreadsheet/built-in-functions/isspreadsheetobject.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
