# AI Functions

## Content

DsExcel Java supports the following AI functions. Please note that before using these AI functions, you need to configure the AI features of DsExcel Java according to the [AI Assistant](/document-solutions/java-excel-api/docs/online/v9.2/Features/ai-assistant) documentation.

| Function Name | Descriptions |
| ------------- | ------------ |
| [AI.QUERY](/document-solutions/java-excel-api/docs/online/v9.2/Features/ai-assistant/ai-functions/aiquery) | This function allows users to submit queries to an AI model for intelligent data processing and analysis. This function is particularly useful for scenarios requiring AI-enhanced transformations or insights based on existing data. |
| [AI.TRANSLATE](/document-solutions/java-excel-api/docs/online/v9.2/Features/ai-assistant/ai-functions/aitranslate) | This function enables translation of specified content into a target language. Powered by AI technology, it provides fast and accurate multilingual text conversion, ideal for international data processing, report translation, and similar scenarios. |
| [AI.TEXTSENTIMENT](/document-solutions/java-excel-api/docs/online/v9.2/Features/ai-assistant/ai-functions/aitextsentiment) | This function analyzes the sentiment of text in cells and returns **Positive**, **Negative**, or **Neutral** results. |

## SpreadJS Compatibility

DsExcel Java uses the `AI.` prefix for AI functions, while SpreadJS uses the `SJS.AI.` prefix. When importing or exporting SJS or SSJSON files, DsExcel Java automatically converts supported AI function names to maintain formula compatibility with SpreadJS.

* When importing SJS or SSJSON format into DsExcel Java, `SJS.AI.<FuncName>` is implicitly converted to `AI.<FuncName>`.
* When exporting to SJS or SSJSON format, `AI.<FuncName>` is implicitly converted to `SJS.AI.<FuncName>`.

This behavior currently applies to the following AI functions:

* [AI.QUERY](/document-solutions/java-excel-api/docs/online/v9.2/Features/ai-assistant/ai-functions/aiquery)
* [AI.TRANSLATE](/document-solutions/java-excel-api/docs/online/v9.2/Features/ai-assistant/ai-functions/aitranslate)
* [AI.TEXTSENTIMENT](/document-solutions/java-excel-api/docs/online/v9.2/Features/ai-assistant/ai-functions/aitextsentiment)

This compatibility behavior applies only to SJS and SSJSON import and export workflows. It does not change the formula syntax that you use in DsExcel Java.