--- title: "User-executed Data Processing Scripts" slug: "user-executed-data-processing-scripts" description: "Add a button to the SQL Spreads ribbon that runs a SQL query of your own when an end user clicks it." updated: 2025-01-30T14:12:48Z published: 2025-01-30T14:12:48Z canonical: "sqlspreads.com/user-executed-data-processing-scripts" --- > ## Documentation Index > Fetch the complete documentation index at: https://sqlspreads.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # User-executed Data Processing Scripts This script allows you to create a button in the SQL Spreads Excel interface that an end user can click on to trigger a customized SQL query. ![image.png](https://cdn.document360.io/ad9d65b3-9cdd-4b28-8cb8-86cb149873bc/Images/Documentation/image%28255%29.png) ## How to add a user-executed script 1. Click the Data Processing button in the SQL Spreads tab. ![Data Processing button in the SQL Spreads ribbon](https://cdn.document360.io/ad9d65b3-9cdd-4b28-8cb8-86cb149873bc/Images/Documentation/Data%20Processing%20button.PNG) 2. Enter a name for your new script. The button text will match the name of the script. ![New Script name field for Data Processing](https://cdn.document360.io/ad9d65b3-9cdd-4b28-8cb8-86cb149873bc/Images/Documentation/Data%20Processing%20Script%20Name%20field.PNG) 3. In the execution timing options, select "When a user clicks a button." ![image.png](https://cdn.document360.io/ad9d65b3-9cdd-4b28-8cb8-86cb149873bc/Images/Documentation/image%28256%29.png) 4. To add a confirmation dialog before the script is executed, enter the desired text in the "Confirmation text" field. ![Confirmation text field in Data Processing feature](https://cdn.document360.io/ad9d65b3-9cdd-4b28-8cb8-86cb149873bc/Images/Documentation/Confirmation%20text%20field%20in%20Data%20Processing%20feature.PNG) 5. Enter your SQL query. ![Enter SQL query dialog](https://cdn.document360.io/ad9d65b3-9cdd-4b28-8cb8-86cb149873bc/Images/Documentation/Enter%20SQL%20Query%20field.PNG) 6. Click OK.