[]
        
(Showing Draft Content)

AI-Assisted Formula Generation and Explanation

The ​​SpreadJS AI Add-on​​ enhances the Formula Eidtor Panel with AI-powered features, allowing users to:

  • ​Generate Excel formulas​​ using natural language.

  • ​Explain existing formulas​​ with step-by-step breakdowns.

These features leverage the current worksheet’s data context for accurate and intelligent formula suggestions.

To use this feature, you first need to configure the AI Add-on for SpreadJS, refer to AI Assistant

User Guide​

Opening the AI Assistant​

  • Click the ​​AI button​​ in the ​​Formula Editor Panel​​ to launch the assistant.

image

Generating a Formula​

  1. ​​Describe your formula need​​ in plain language (e.g., "Calculate the average of values in Column A").

  2. Press ​​Enter​​ or click ​​Send​​ to submit.

    • Use ​​Shift + Enter​​ for multi-line input.

  3. The AI-generated formula will appear in the ​​Formula Editor Panel​​, formatted for readability.

  4. Click ​​Apply​​ to insert the formula into the active cell.

  5. Click ​​Close​​ to exit the assistant.

image

1. Provide specific details (e.g., cell ranges and conditions) for better accuracy.

2. Test the formula with sample data to verify its correctness.

3. Different AI models have different capabilities, so the results they return may also vary.

Explaining a Formula​

  1. Enter or paste an existing formula into the ​​Formula Editor Panel​​.

  2. Click the ​​Query​​ button to receive a breakdown, may including:

    • Formula Meaning

    • Formula Breakdown

    • ​​Function & arguments​​ explanation.

    • Explain with Context

  3. If you're not satisfied with the generated results, click the refresh button to regenerate them.

image

Best Practices

  • Generating complex formulas: Describe your requirements step by step (for example, filter first, then sum).

  • Debugging formulas: Use the "Explain" feature to verify the correctness of your formula's logic.

  • Learning tool: Learn how to use functions through AI-generated formulas and explanations.

This feature relies on a network connection to call AI services.

After generating formulas, it's recommended to manually check the data ranges and logic to ensure they meet your expectations.