Overview
SAI (SheetXAI AI) is SheetXAI's powerful formula system that brings AI directly into your spreadsheet cells. With SAI commands, you can generate content, analyze data, process images, create media, and automate tasks—all using simple, natural language instructions.
⚠️ Important Reminder: SAI commands are formulas that go directly into spreadsheet cells, not messages for the SheetXAI Chatbot. Type your SAI command (like
#SAI translate this #A) directly into a cell, not in the chatbot sidebar.
Platform Availability: SAI commands work in both Google Sheets and Excel. You can use the #SAI command format (which auto-transforms to formulas) or type native spreadsheet formulas directly. The #SAI format is recommended as it works consistently across both platforms.
Important: In Google Sheets, you must activate SAI formulas in any new spreadsheet before using them.
What Makes SAI Special?
SAI formulas create a direct conversation between AI and each individual row of your spreadsheet. Unlike the SheetXAI Chatbot (which performs batch operations), SAI formulas allow for personalized, row-specific AI processing where each cell gets its own unique output based on that row's data.
Key Benefits:
- Row-specific processing: Each row gets personalized AI output
- Natural language: Write instructions in plain English
- Multiple operation types: Text, images, videos, audio, PDFs, web scraping, and more
- Dynamic cell references: Reference data from the same row or fixed ranges
- Batch processing: Use
!ARRAYto run formulas across all rows automatically
Basic SAI Syntax
The basic format for SAI commands is:
#SAI [operation prefix] [your instruction] [cell references]
Important: Type this command directly into a spreadsheet cell (not in the chatbot). The formula will process and return results in that same cell.
Simple Example:
#SAI translate this to Spanish #A
This command translates the content in column A of the current row to Spanish. Type it directly into a cell (e.g., put it in column B to translate values from column A).
Priority Order
When building SAI commands, the system follows a specific priority order:
!ARRAY(always first if used) - Runs the formula across all rows- Operation Prefixes (e.g.,
!PDF,!URL,!IMAGE) - Specifies the type of operation - Content Model (only for text operations) - Alternative models like
!CONTENT2,!CONTENT3,!CONTENT4 - Your Instruction - The natural language request
- Cell References - Data from your spreadsheet
Important: You must configure the models for the operation you want to use in Settings first! Each operation prefix requires specific settings to be configured in the SheetXAI Settings panel.
Operation Prefixes
Operation prefixes tell SAI what type of operation to perform. Here's a complete reference:
!PDF - PDF Document Analysis
Analyze and extract information from PDF documents.
Requirements:
- PDF links in referenced column (must end in
.pdf) - Content tab configured in Settings
Example:
#SAI !PDF summarize this document #A
Use Cases:
- Summarize PDF reports
- Extract key information from documents
- Analyze contract terms
- Process invoice data
Related Guide: Using PDF Input in SAI Operations
!URL - Web Research and Analysis
Analyze specific websites or perform live web searches.
Requirements:
- URL tab configured in Settings
- Can work with or without URLs in cells
Example:
#SAI !URL research this company #A
Use Cases:
- Company research
- Competitor analysis
- Website content extraction
- Live web searches
Related Guide: Accessing URLs with Perplexity in Google Sheets
!IMAGE - Image Analysis
Describe, analyze, or extract text from images.
Requirements:
- Image URLs in referenced column
- Image Analysis tab configured in Settings
Example:
#SAI !IMAGE describe this product #A
Use Cases:
- Generate alt text for images
- Product descriptions from photos
- Extract text from images (OCR)
- Analyze visual content
Related Guide: Analyzing Images in Bulk with SheetXAI
!IMAGEGEN - Image Generation
Generate high-quality AI images from text descriptions.
Requirements:
- Image Generation tab configured in Settings
- No special input required
Example:
#SAI !IMAGEGEN create a logo for #A
Use Cases:
- Logo generation
- Product mockups
- Marketing visuals
- Creative assets
Related Guide: Using Images with SheetXAI: Generation and Analysis
!VIDEO - Video Generation
Create 5-10 second AI videos from text or image inputs.
Requirements:
- Video tab configured in Settings
- Optional: Image URLs for input
Example:
#SAI !VIDEO create a product showcase for #A
Use Cases:
- Product showcase videos
- Marketing videos
- Social media content
- Video ads
Related Guide: How to Generate AI Videos with Vadoo in SheetXAI
!AUDIO - Audio Generation
Convert text to high-quality speech or audio.
Requirements:
- Audio tab configured in Settings
- No special input required
Example:
#SAI !AUDIO create a welcome message for #A
Use Cases:
- Voiceovers
- Podcast intros
- Audio ads
- Text-to-speech conversion
Related Guide: How to Set Up ElevenLabs Audio Generation in SheetXAI
!UPSCALING - Image Upscaling
Increase image resolution and quality (up to 4x).
Requirements:
- Image URLs in referenced column
- Upscaling tab configured in Settings
Example:
#SAI !UPSCALING #A
Use Cases:
- Enhance low-resolution images
- Improve image quality
- Prepare images for print
- Upscale product photos
!EXASCRAPE - Web Scraping
Extract full clean markdown content from any URL.
Requirements:
- URLs (single cell or direct URLs)
- EXA must be configured in the Misc tab in Settings
- Misc tab configured in Settings
Example:
#SAI !EXASCRAPE #A
Use Cases:
- Extract article content
- Scrape product information
- Gather data from websites
- Content aggregation
Related Guide: Using Exa Scraping in SheetXAI
!ASKEXA - Neural Web Search
Perform neural web search for factual questions.
Requirements:
- EXA must be configured in the Misc tab in Settings
- Misc tab configured in Settings
- No special input required
Example:
#SAI !ASKEXA what is #A
Use Cases:
- Factual research
- Quick information lookup
- Data verification
- Knowledge queries
!CONTENT2, !CONTENT3, !CONTENT4, !CONTENT5 - Alternative Content Models
Use specific alternative models for different tasks.
Requirements:
- Multiple content models configured in Content tab Settings
Example:
#SAI !CONTENT2 translate #A
Use Cases:
- Use different AI models for specific tasks
- Optimize for cost or quality
- A/B test different models
- Specialized content generation
Cell References
SAI commands use special syntax to reference cells and columns. Understanding cell references is crucial for building effective SAI formulas.
Current Row Reference: #A
References column A in the current row. Updates dynamically in array formulas.
Example:
#SAI translate this #A
Translates the value in column A of the current row.
Fixed Cell Reference: #A2
References a specific cell (A2) that stays fixed even in array formulas.
Example:
#SAI compare #A with the target #B2
Compares the current row's column A with the fixed value in B2.
Fixed Range: A2:B10
References a specific range of cells that stays fixed in array formulas.
Example:
#SAI check if #A is in the list A2:A10
Checks if the current row's column A value exists in the fixed range A2:A10.
Column Range: #A-E
References columns A through E in the current row.
Example:
#SAI write an email using #A-E
Uses data from columns A through E of the current row to write an email.
Specific Columns: #A,B,D
References specific columns (A, B, and D) in the current row.
Example:
#SAI create a summary from #A,B,D
Creates a summary using only columns A, B, and D from the current row.
Mixed References
You can combine different reference types:
Example:
#SAI compare #A-C with the baseline #D2
Compares columns A-C of the current row with the fixed value in D2.
!ARRAY - Batch Processing
The !ARRAY prefix runs your SAI formula across all rows in your sheet automatically. This is incredibly powerful for processing large datasets.
Important: !ARRAY must come first in your command, before any operation prefixes.
Basic !ARRAY Example
#SAI !ARRAY translate #A
This translates column A for all rows in the sheet.
!ARRAY with Operation Prefixes
#SAI !ARRAY !URL research #A
This researches companies in column A for all rows.
!ARRAY with Multiple Columns
#SAI !ARRAY write email for #A-C
This creates emails for all rows using data from columns A-C.
When to Use !ARRAY
Use !ARRAY when you want to:
- Process all rows with the same operation
- Generate content for an entire dataset
- Analyze data across multiple rows
- Apply the same transformation to all rows
Pro Tip: The SAI Commands Builder has a "Run on all rows" checkbox that automatically adds !ARRAY to your commands. This is the easiest way to create array formulas.
Real-World Examples
Remember: These SAI commands go directly into spreadsheet cells, not in the chatbot. Type the command into the cell where you want the output to appear.
Example 1: Product Descriptions
Scenario: You have product names in column A and want descriptions in column B.
Setup:
- Column A contains product names (e.g., "Wireless Headphones", "Smart Watch")
- Column B is where you'll put the formula
Command (put this in column B):
#SAI !ARRAY write a compelling product description for #A
Result: Each row in column B gets a unique product description based on the product name in column A of that same row.
Example 2: Customer Research
Scenario: You have company names in column A and want research summaries in column B.
Setup:
- Column A contains company names (e.g., "Acme Corp", "TechStart Inc")
- Column B is where you'll put the formula
Command (put this in column B):
#SAI !ARRAY !URL research this company and provide a summary #A
Result: Each row in column B gets a researched summary of the company name in column A of that same row.
Example 3: Image Analysis
Scenario: You have product image URLs in column A and want alt text in column B.
Setup:
- Column A contains image URLs (e.g., "https://example.com/product1.jpg")
- Column B is where you'll put the formula
Command (put this in column B):
#SAI !ARRAY !IMAGE create detailed alt text for this product image #A
Result: Each row in column B gets descriptive alt text for the image URL in column A of that same row.
Example 4: Multi-Column Content Generation
Scenario: You have customer names in column A, products in column B, and purchase dates in column C. You want personalized emails in column D.
Setup:
- Column A contains customer names
- Column B contains product names
- Column C contains purchase dates
- Column D is where you'll put the formula
Command (put this in column D):
#SAI !ARRAY write a personalized follow-up email for customer #A about their purchase of #B on #C
Result: Each row in column D gets a unique email combining data from columns A, B, and C of that same row.
Example 5: Conditional Content
Scenario: You have status in column A and notes in column B. You want explanations in column C, but only for "Delayed" items.
Setup:
- Column A contains status (e.g., "Delayed", "On Track", "Completed")
- Column B contains notes
- Column C is where you'll put the formula
Command (put this in column C):
#SAI if #A is "Delayed", explain this delay professionally: #B. Otherwise, return "On Track"
Result: Rows with "Delayed" status in column A get explanations in column C based on the notes in column B. Other rows get "On Track" in column C.
Using the SAI Commands Builder
The SAI Commands Builder (accessed via the "SAI" button in the sidebar) makes it easy to create SAI commands without memorizing syntax.
Key Features:
- Generator Tab: Visual interface to build commands with input/output type selection
- History Tab: Access your 5 most recent commands
- Settings Tab: Configure SAI call formats and sheet-wide actions
- Guide Tab: Complete reference guide (similar to this article)
Related Guide: Using the SAI Commands Builder in SheetXAI
Best Practices
1. Configure Settings First
Before using operation prefixes, make sure you've configured the required models in Settings:
- Content tab for
!PDFand text operations - URL tab for
!URL - Image Analysis tab for
!IMAGE - Image Generation tab for
!IMAGEGEN - Video tab for
!VIDEO - Audio tab for
!AUDIO - Misc tab for
!EXASCRAPEand!ASKEXA(requires EXA to be configured)
2. Use Specific Instructions
Be specific in your instructions for better results:
❌ Vague: #SAI analyze #A
✓ Specific: #SAI analyze this customer feedback and identify the key sentiment and main issues #A
3. Reference Cells Explicitly
Always reference the cells you want to use:
❌ Missing reference: #SAI summarize the products
✓ With reference: #SAI summarize this product #A
4. Use !ARRAY for Batch Operations
When processing multiple rows, use !ARRAY instead of copying formulas:
❌ Manual: Copy formula to each row
✓ Efficient: #SAI !ARRAY translate #A
5. Make Formulas Static When Done
After your formulas have generated the desired results, use "Make All Formulas Static" from the SAI Commands Builder Settings tab to:
- Prevent unnecessary API calls
- Reduce costs
- Lock in your results
6. Test with Single Row First
Before using !ARRAY, test your command on a single row to ensure it works correctly.
Common Mistakes to Avoid
Mistake 1: Wrong Tool for the Job
❌ Using SAI formula for formula generation:
#SAI create a formula to extract domains from emails
✓ Use the Chatbot instead for formula generation.
Related Guide: When to Use SAI Formula vs. Chatbot
Mistake 2: Missing Cell References
❌ No reference: #SAI summarize the products in column A
✓ With reference: #SAI summarize this product #A
Mistake 3: Wrong Operation Prefix Order
❌ Wrong order: #SAI translate !ARRAY #A
✓ Correct order: #SAI !ARRAY translate #A
Remember: !ARRAY always comes first!
Mistake 4: Not Configuring Settings
❌ Using !VIDEO without configuring the Video tab in Settings
✓ Configure the required settings tab before using operation prefixes
Troubleshooting
SAI Formula Not Working (#NAME Error)
If you see #NAME errors in Google Sheets, you need to activate SAI formulas.
Solution: Activate SAI Formulas - Troubleshooting Guide
Parse Errors or Formatting Issues
If you're getting parse errors or formatting issues, check locale settings.
Solution: SAI Transformations Auto-Detect Locale
Operation Not Working
If an operation prefix isn't working:
- Check that you've configured the required Settings tab
- Verify your API keys are set up correctly
- Check that you have sufficient credits
- Review the operation's requirements (e.g., PDFs must end in
.pdf)
Related Guide: SAI Troubleshooting Overview
Advanced Features
Custom Commands
Create reusable system prompts for common tasks using Custom Commands.
Example:
#SAI !!WOO black shoes
Where !!WOO is a custom command you've defined.
Related Guide: Custom Commands in SheetXAI
Combining Operations
You can combine multiple concepts in a single command:
Example:
#SAI !ARRAY !URL research this company #A and create a summary in bullet points
Related Guides
- Using the SAI Commands Builder - Visual tool for creating SAI commands
- When to Use SAI Formula vs. Chatbot - Choose the right tool
- SAI Troubleshooting Overview - Fix common issues
- Custom Commands in SheetXAI - Create reusable commands
- Generating Personalized Content at Scale - Advanced use cases
Quick Reference
Operation Prefixes
| Prefix | Purpose | Settings Tab |
|---|---|---|
!PDF | PDF analysis | Content |
!URL | Web research | URL |
!IMAGE | Image analysis | Image Analysis |
!IMAGEGEN | Image generation | Image Generation |
!VIDEO | Video generation | Video |
!AUDIO | Audio generation | Audio |
!UPSCALING | Image upscaling | Upscaling |
!EXASCRAPE | Web scraping | Misc (requires EXA) |
!ASKEXA | Neural search | Misc (requires EXA) |
!CONTENT2-5 | Alternative models | Content |
Cell Reference Syntax
| Syntax | Meaning |
|---|---|
#A | Column A in current row |
#A2 | Fixed cell A2 |
A2:B10 | Fixed range |
#A-E | Columns A through E in current row |
#A,B,D | Specific columns A, B, D in current row |
Priority Order
!ARRAY(if used)- Operation prefixes
- Content models (
!CONTENT2-5) - Your instruction
- Cell references
Ready to get started? Open the SAI Commands Builder in your spreadsheet and try creating your first SAI command!