Skip to content

Commit 163fc4f

Browse files
Merge pull request #3247 from syncfusion-content/EJ2-1030280-AI-Assist
1030280: Updated UG content for Built-In AI Assist for Spreadsheet
2 parents 91277ce + d04e610 commit 163fc4f

6 files changed

Lines changed: 28 additions & 84 deletions

File tree

Document-Processing-toc.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5653,8 +5653,7 @@
56535653
<li><a href="/document-processing/excel/spreadsheet/react/getting-started">Getting Started</a></li>
56545654
<li><a href="/document-processing/excel/spreadsheet/react/ui-builder-skill">Agentic UI Builder</a></li>
56555655
<li><a href="/document-processing/excel/spreadsheet/react/data-binding">Data Binding</a></li>
5656-
<li>
5657-
<a href="/document-processing/excel/spreadsheet/react/ai-assist/ai-assist">AI Assist</a>
5656+
<li><a href="/document-processing/excel/spreadsheet/react/ai-assist/overview">AI Assist</a>
56585657
<ul>
56595658
<li><a href="/document-processing/excel/spreadsheet/react/ai-assist/integration">Integration</a></li>
56605659
<li>AI Service

Document-Processing/Excel/Spreadsheet/React/ai-assist/ai-service/using-node-js.md

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ documentation: ug
1111

1212
AI Assist requires a backend service to process prompts and return AI-generated responses. This topic explains how to create a **Node.js** server with **Azure OpenAI** credentials.
1313

14-
---
15-
1614
## Prerequisites
1715

1816
Ensure the following are available before you begin.
@@ -42,8 +40,6 @@ const azureDeploymentName = 'Your_Deployment_Name';
4240
* Node.js v18 or later
4341
* npm v9 or later
4442

45-
---
46-
4743
## Install dependencies
4844

4945
Run the following command in your server project:
@@ -80,8 +76,6 @@ Ensure your `package.json` includes `"type": "module"` to support ES module impo
8076
}
8177
```
8278

83-
---
84-
8579
## Configure credentials
8680

8781
Create a `.env` file in the project root and add your Azure OpenAI credentials:
@@ -95,8 +89,6 @@ apiVersion = Your_Azure_OpenAI_API_Version
9589

9690
> **Important:** Add `.env` to `.gitignore` to prevent exposing secrets.
9791
98-
---
99-
10092
## Configure required modules
10193

10294
Create `ai-model.js` to initialize the Azure OpenAI client using the credentials from `.env`:
@@ -163,8 +155,6 @@ app.listen(PORT, () => {
163155
});
164156
```
165157

166-
---
167-
168158
## Run the server
169159

170160
Run the following command to start the server:
@@ -179,8 +169,6 @@ The server runs on `http://localhost:3000`. Update the AI Assist endpoint like b
179169
http://localhost:3000/api/AIAssist/Chat
180170
```
181171

182-
---
183-
184172
## Connect to the React Spreadsheet
185173

186174
Once the server is listening, Configure the `requestUrl` inside [`aiAssistSettings`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#aiassistsettings) to point to the server endpoint:
@@ -208,8 +196,6 @@ export default function App() {
208196

209197
{% endraw %}
210198

211-
---
212-
213199
## Reference
214200

215201
### Environment variables (`.env`)
@@ -243,8 +229,6 @@ And returns:
243229
}
244230
```
245231

246-
---
247-
248232
## Sample
249233

250234
A Node.js server sample project is available for quick setup. Extract the archive, update the Azure OpenAI credentials in the `.env` file, and start the server using the following command
@@ -255,9 +239,6 @@ npm start
255239

256240
[Download Node.js Server](https://drive.google.com/file/d/1V3TlO_6GS3dV986I7sDizmE9kwojkOrx/view?usp=drive_link)
257241

258-
---
259-
260242
## See also
261243

262-
* [AI Assist overview](../ai-assist)
263244
* [Web API (.NET) server setup](./using-web-api)

Document-Processing/Excel/Spreadsheet/React/ai-assist/ai-service/using-web-api.md

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ documentation: ug
1111

1212
AI Assist requires a backend service to process prompts and return AI-generated responses. This topic explains how to create an **ASP.NET Core Web API** using **Azure OpenAI** credentials.
1313

14-
---
15-
1614
## Prerequisites
1715

1816
Ensure the following are available before you begin.
@@ -42,8 +40,6 @@ const azureDeploymentName = 'Your_Deployment_Name';
4240
* .NET 8 SDK or later
4341
* Visual Studio 2022 or the .NET CLI
4442

45-
---
46-
4743
## Install dependencies
4844

4945
Run the following commands in your Web API project to install the required NuGet packages:
@@ -60,8 +56,6 @@ dotnet add package Microsoft.Extensions.AI.OpenAI
6056
| `Microsoft.Extensions.AI` | Abstractions for AI services in .NET |
6157
| `Microsoft.Extensions.AI.OpenAI` | Bridges `IChatClient` with the Azure OpenAI client |
6258

63-
---
64-
6559
## Configure credentials
6660

6761
Add the Azure OpenAI credentials in `appsettings.json` under `AI` section:
@@ -76,8 +70,6 @@ Add the Azure OpenAI credentials in `appsettings.json` under `AI` section:
7670
}
7771
```
7872

79-
---
80-
8173
## Configure required modules
8274

8375
Update `Program.cs` to register the Azure OpenAI client and required services:
@@ -193,8 +185,6 @@ namespace WebService.Controllers
193185
}
194186
```
195187

196-
---
197-
198188
## Run the application
199189

200190
Run the following command to start the Web API server:
@@ -209,8 +199,6 @@ The server runs on `https://localhost:{port}` (as defined in `launchSettings.jso
209199
https://localhost:{port}/api/AIAssist/Chat
210200
```
211201

212-
---
213-
214202
## Connect to the React Spreadsheet
215203

216204
Once the server is listening, Configure the `requestUrl` inside [`aiAssistSettings`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#aiassistsettings) to point to the server endpoint:
@@ -236,8 +224,6 @@ export default function App() {
236224

237225
{% endraw %}
238226

239-
---
240-
241227
## Reference
242228

243229
### Configuration keys (`appsettings.json`)
@@ -270,8 +256,6 @@ And returns:
270256
}
271257
```
272258

273-
---
274-
275259
## Sample
276260

277261
A Web API server sample project is available for quick setup. Extract the archive, update the Azure OpenAI credentials in `appsettings.json`, and start the server using the following command:
@@ -283,9 +267,6 @@ dotnet run
283267
* [Web API Server](https://drive.google.com/file/d/13K7a89Vk4Xt7dgd4wt49q272bSVSVuz3/view?usp=drive_link)
284268
* [Live Demo](https://document.syncfusion.com/demos/spreadsheet-editor/react/#/tailwind3/spreadsheet/ai-smart-spreadsheets)
285269

286-
---
287-
288270
## See also
289271

290-
* [AI Assist overview](../ai-assist)
291272
* [Node.js server setup](./using-node-js)

Document-Processing/Excel/Spreadsheet/React/ai-assist/integration.md

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ AI Assist integrates seamlessly into your React Spreadsheet application, enablin
1717

1818
Ensure the following before integrating AI Assist:
1919

20-
* Backend Server: A running backend AI service (Node.js or Web API) with Azure OpenAI credentials configured on the server. For setup instructions, see [Web API Server](./ai-service/using-web-api.md)/[Node.js Server](./ai-service/using-web-api.md) for setup instructions.
20+
* Backend Server: A running backend AI service (Node.js or Web API) with AI credentials configured on the server.
21+
* For setup instructions, see the:
22+
* [ASP.NET Web API Server](./ai-service/using-web-api)
23+
* [Node.js Server](./ai-service/using-node-js)
2124

2225
### Inject the AI Assist Module
2326

@@ -47,8 +50,6 @@ function App() {
4750

4851
This enables the AI Assist into the spreadsheet.
4952

50-
---
51-
5253
### Configure AI Assist Settings
5354

5455
Use the [`aiAssistSettings`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#aiassistsettings) property to connect spreadsheet to the backend server and customize the AI Assist.
@@ -75,8 +76,6 @@ function App() {
7576

7677
Your Spreadsheet is now integrated with AI Assist and ready to use.
7778

78-
---
79-
8079
## How-To Guides
8180

8281
### Open and Close the AI Panel
@@ -90,9 +89,7 @@ Your Spreadsheet is now integrated with AI Assist and ready to use.
9089

9190
All actions performed by AI Assist are recorded in the spreadsheet's undo/redo history. Press Ctrl+Z to revert any change made by the AI, just like a manual edit.
9291

93-
---
94-
95-
### How to Attach Extra Data Before a Request is Sent
92+
### How to Customize the Request Before Sending
9693

9794
Use the [`promptRequest`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#promptrequest) event to add custom data — such as a user ID or session token — to the request before it reaches your server.
9895

@@ -121,8 +118,6 @@ function App() {
121118

122119
You can also prevent the request entirely by setting `args.cancel = true`.
123120

124-
---
125-
126121
### How to Handle AI Responses
127122

128123
Use the [`promptResponse`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#promptresponse) event to run custom logic after the AI completes its task — for example, logging results or showing a notification.
@@ -148,8 +143,6 @@ function App() {
148143
}
149144
```
150145

151-
---
152-
153146
### Troubleshoot server connection issues
154147

155148
If the AI panel displays an error message:
@@ -173,8 +166,6 @@ If the AI panel displays an error message:
173166
* Review the terminal/console where your server is running
174167
* Look for connection or authentication errors
175168

176-
---
177-
178169
## API References
179170

180171
### AI Assist Settings
@@ -185,17 +176,13 @@ If the AI panel displays an error message:
185176
| `placeholder` | `string` | The hint text shown inside the prompt input box. |
186177
| `promptSuggestions` | `string[]` | A list of quick-start prompts shown to the user as clickable suggestions. |
187178

188-
---
189-
190179
### Events
191180

192181
| Event | When it fires | Common use |
193182
|---|---|---|
194183
| [`promptRequest`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#promptrequest) | Before the prompt is sent to the server | Attach extra data or cancel the request |
195184
| [`promptResponse`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#promptresponse) | After the AI completes and responds | Log results or trigger custom UI updates |
196185

197-
---
198-
199186
### What Can You Ask the AI?
200187

201188
Type your request in plain English — no formulas or technical knowledge needed.
@@ -266,8 +253,6 @@ Type your request in plain English — no formulas or technical knowledge needed
266253
| *"Add a line chart showing the monthly trend"* | Creates a line chart to visualize changes over time |
267254
| *"Insert a pie chart with a title called 'Revenue Split'"* | Creates a pie chart with a custom title |
268255

269-
---
270-
271256
## See also
272257

273258
* [Node.js server setup](./using-node-js)

Document-Processing/Excel/Spreadsheet/React/ai-assist/ai-assist.md renamed to Document-Processing/Excel/Spreadsheet/React/ai-assist/overview.md

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,11 @@ documentation: ug
1313

1414
![Spreadsheet AI Assist panel](../images/spreadsheet_ai_assist.gif)
1515

16-
---
17-
18-
## Server Connection
19-
20-
To configure the backend service, refer - [Web API Server](./ai-service/using-web-api.md)/[Node.js Server](./ai-service/using-web-api.md)
21-
22-
---
23-
2416
## Integration
2517

2618
AI Assist integrates seamlessly into your React Spreadsheet application with minimal configuration. This includes injecting the module, enabling the feature, configuring the backend server connection, handling events, and exploring the full range of supported prompts.
2719

28-
For complete setup instructions, how-to guides, API references, and prompt examples, see [AI Assist Integration](./integration.md).
29-
30-
---
20+
For complete setup instructions, how-to guides, API references, and prompt examples, see [AI Assist Integration](./integration).
3121

3222
## How AI Assist Works in spreadsheet
3323

@@ -37,15 +27,30 @@ Understanding how AI Assist processes your request helps you write better prompt
3727

3828
When you submit a prompt in the AI Assist panel, the following happens behind the scenes:
3929

40-
**1. Intent Recognition**
30+
- **Intent Recognition**
4131
Your prompt is sent to the AI server, which reads it and determines what type of action you want — for example, formatting, editing, generating a report, or creating a chart. This step figures out the *what*.
4232

43-
**2. Command Generation**
33+
- **Command Generation**
4434
Once the intent is known, the spreadsheet's current data and the identified action are sent back to the AI. The AI then generates a precise set of instructions — such as which cells to update, what styles to apply, or what chart data to use. This step figures out the *how*.
4535

46-
**3. Execution**
36+
- **Execution**
4737
The generated instructions are applied directly to the spreadsheet. The result appears instantly in the grid, and a confirmation message is shown in the AI panel. Every change is also added to the undo history, so nothing is permanent.
4838

39+
## Supported Features
40+
41+
AI Assist supports a wide range of spreadsheet operations through natural language prompts:
42+
43+
| Feature | Description |
44+
|---|---|
45+
| **Data Analysis** | Generate insights including summaries, KPIs, top records, and visual suggestions. |
46+
| **Data Operations** | Edit cell values, apply AutoFill, and manage content. |
47+
| **Rules & Validation** | Apply conditional formatting and data validation rules. |
48+
| **Formatting** | Apply styles such as bold, italic, font color, background color, number formats, and wrap text. |
49+
| **Structure Management** | Insert/delete rows and columns, merge cells, and freeze panes. |
50+
| **Clipboard Actions** | Perform cut, copy, and paste operations through AI commands. |
51+
| **Navigation** | Perform sorting, filtering, and find & replace operations. |
52+
| **Visualization** | Insert charts with multiple types, themes, titles, and sizing options. |
53+
4954
### Writing Effective Prompts
5055

5156
AI responses are only as good as the prompt you provide. Vague requests like *"fix this"* give the AI very little context. More specific prompts like *"highlight all values in column B that are greater than 500 in red"* produce reliable, accurate results.
@@ -54,23 +59,16 @@ AI responses are only as good as the prompt you provide. Vague requests like *"f
5459

5560
AI Assist only operates on the **currently active sheet**. It cannot read from or apply changes across multiple sheets in a single prompt.
5661

57-
---
58-
5962
## Limitations
6063

61-
Understanding the current limitations of AI Assist helps you plan your integration and set accurate expectations for end users.
62-
63-
* **Backend server is required**: AI Assist relies on a running backend service to process prompts. You must configure a valid `requestUrl` that points to an active Node.js or ASP.NET Web API server. The feature will not work in offline environments or when the server is unreachable.
64+
* **Backend server is required**: AI Assist relies on a running backend service to process prompts. You must configure a valid `requestUrl` that points to an active Node.js or ASP.NET Web API server.
6465

6566
* **Operates on the active sheet only**: AI actions are scoped to the sheet that is currently open and selected. If you need the same change applied to multiple sheets, you must submit a separate prompt for each sheet individually.
6667

6768
* **Prompt clarity affects result quality**: The AI interprets your request as written, so the quality of the output depends on how clearly the prompt is phrased. Broad or ambiguous prompts such as *"fix this"* may not produce the intended result. For consistent and accurate outcomes, use specific instructions — for example, *"bold the header row and apply a blue background to cells A1 through E1"*.
6869

69-
* **Single-file scope**: AI Assist works exclusively within the currently loaded spreadsheet. It cannot read data from or apply changes to other Excel or CSV files that are not open in the same session.
70-
71-
---
72-
7370
## See Also
7471

75-
* [Charts](../charts-and-visualizations.md)
72+
* [Open-Excel-Files](../open-excel-files)
73+
* [Save-Excel-Files](../save-excel-files)
7674
* [Data Binding](../data-binding)
26.1 KB
Loading

0 commit comments

Comments
 (0)