Results Grid Scripter (Flexible Template-based Scripting)
Results Grid Scripter
is a powerful tool that allows you to script data from Result Grid to disk or clipboard in different formats with the help of customizable scripting templates.
It takes just a few clicks to export data from Results grid to Excel (as XML spreadsheet) or your Web browser (as HTML table). To do so right-click Results Grid and choose Script grid data
A dockable floating window will appear:
Choose between "All grids", "Current grid" or "Selection" and select "To Disk". Use drop-down "Template" menu to select "Excel (MS XML Spreadsheet)" and press "Start Scripting" button:
Selected data from Results Grid will immediately be scripted to MS Excel. Scripted values remain consistent and keep all data type information, strings are not truncated:
You can also script data in JSON format. Use drop-down "Template" menu to select "JSON" and press "Start Scripting" button:
Selected data from Results Grid will immideately be scripted to a *.json file in %APPDATA%\SSMSBoost
folder, or any other location that you indicate manually
Grid Scripting Templates
Existing templates can be flexibly customized and new templates can be added at SSMSBoost->Settings->Grid Scripting Templates
. You can reach this menu directly from Results Grid scripting
window by pressing
button to the left of the drop-down "Template" menu
Results Grid Scripter
is shipped with the following predefined templates:
- Excel (MS XML Spreadsheet) - saves results in MS XML Spreadsheet format that can be opened in MS Excel.
Values preserve their data types: If you export telephone numbers to Excel they will not be treated as formulas anymore!
- JSON - get Results Grid data directly in JSON format. No further converters required.
- HTML table - results are saved as HTML Table
- INSERT INTO - generates a table declaration that can be used to insert execution results of the stored procedure.
- INSERT INTO #tmpres EXEC sp_storedProc - quickly generates a temporary table declaration that can be used to insert execution results of the stored procedure.
- Property:Value - copies results as ColumnName:Value
- SELECT - scripts results as SELECT VALUES statement. It is some kind of table data exported as script. Data types are preserved.
- WHERE Column=Value - selected values are copied as 'WHERE (ColumnName=Value) OR ...' allowing you to quickly generate WHERE filters by selecting required column values
- WHERE ColumnName IN (value1,value2..) - generates WHERE ColumnName in (Value1,..) filter based on selected values
- XML - results are saved as pure XML document
Use existing templates as samples to experiment and create your own templates.
If you think you have created useful ones and would like to share them with SSMS community don't hesitate to post your templates to our forum
We recommend to test each provided template at least once for better understanding of its purpose.