This sample demonstrates how the Syncfusion Blazor Spreadsheet, when integrated with an AI-powered assistant, provides an intelligent assistant to help users analyze and interact with worksheet data using natural language prompts.
Platform: Blazor (Syncfusion Blazor components). This sample targets the Blazor platform and demonstrates how to integrate an external AI service with the Syncfusion Spreadsheet component.
In this example, the Spreadsheet component is integrated with an AI-powered assistant that enables users to:
- Analyze data using plain-language queries
- Get summaries of worksheet content with key observations and trends
- Apply formatting and updates directly to cells based on AI suggestions
- Ask questions about specific data ranges or calculated values
- Automate repetitive tasks like highlighting top values, replacing content, and styling cells
The AI assistant appears in a side panel when the "AI Assist" button is clicked, providing an intuitive way to work with spreadsheet data without complex formulas or manual operations.
- Natural Language Processing: Interact with your spreadsheet data using conversational prompts
- Automated Cell Formatting: Apply colors, fonts, alignment, and other styles based on AI recommendations
- AI-driven Data Updates: Update cell values programmatically through AI guidance
- Prompt Suggestions: Built-in suggestions help users get started with common tasks
This AI-powered Spreadsheet analyzes the current worksheet data when the "AI Assist" floating action button is clicked. The AI processes the data and provides:
-
Initial Analysis: A comprehensive summary of the worksheet highlighting key patterns, trends
-
Interactive Prompts: Users can type custom prompts or select from suggestions like:
- "Highlight top 5 highest sales in Amount"
- "Replace Credit Card with Gift Card and highlight"
- "Bold the header row and apply a light background"
-
Automated Actions: The AI can update cell values, apply formatting (background colors, fonts, alignment, bold, italic, underline) directly into the worksheet
The AI can apply various cell formats including:
- Background colors: Named colors (red, blue, yellow, etc.) or hex codes
- Font styles: Bold, italic, underline
- Font properties: Size, color, family
- Text alignment: Left, center, right, top, middle, bottom
- Update cell values with new text or numbers
- Insert formulas into cells
- Replace specific content across multiple cells
- Highlight cells based on criteria (top values, specific conditions)
- Size Limits: Very large workbooks or extremely wide ranges may be truncated before sending to the AI service
- Safety & Validation: Programmatic edits are applied based on AI output; users should validate important changes before saving
- Financial Analysis: "Highlight all negative values in red and positive values in green"
- Report Formatting: "Make the first row bold with blue background and center-align all headers"
- Cell Formatting: "Highlight top 10 performers in yellow"