# SJS.AI.TEXTSENTIMENT

## Content

## Summary

**SJS.AI.TEXTSENTIMENT** is a function in SpreadJS that analyzes the sentiment of text in cells and returns ​**​Positive​**​, ​**​Negative​**​, or ​**​Neutral​**​ results.
This feature is useful for:

* Customer review analysis
* Social media sentiment monitoring
* Product feedback classification
* Other text sentiment analysis scenarios

## Syntax

```javascript
=SJS.AI.TEXTSENTIMENT(array, positive, negative, [neutral])
```

## **​**Arguments

| Parameter | Description |
| --------- | ----------- |
| ​**​array​**<br>Required​ | The input text or a cell reference containing the text to analyze (e.g., `B2:B9`). |
| ​**​positive​**<br>Required​ | The value returned if the sentiment is ​**​Positive​**​. |
| ​**​negative​**<br>Required​ | The value returned if the sentiment is ​**​Negative​**​. |
| ​**​neutral​**<br>Optional​ | The value returned if the sentiment is ​**​Neutral​**​. If omitted, it may return a blank. |

**Remarks:**

* SJS.AI.TEXTSENTIMENT is an asynchronous formula that will return #BUSY! during the analysis process.

## Examples

Assume `B2:B4` contains customer reviews, and we want to classify them as ​**​Good Review​**​, ​**​Bad Review​**​, or ​**​Neutral Review​**​.

```auto
=SJS.AI.TEXTSENTIMENT(B2:B4, "Good Review", "Bad Review", "Neutral Review")
```

![image](https://cdn.mescius.io/document-site-files/images/7719ad0a-f083-46d7-aff6-f63e2e187c15/image.cc9e60.png?width=1000)