# Export Data Results and Code to Excel

**URL:** <https://forums.toadworld.com/t/export-data-results-and-code-to-excel/53898>\
**Category:** Toad Data Point & Toad Intelligence Central\
**Created:** [October 23, 2021, 3:29pm UTC](https://forums.toadworld.com/t/export-data-results-and-code-to-excel/53898 "2021-10-23T15:29:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![peteslate2001](https://avatars.discourse-cdn.com/v4/letter/p/eb9ed0/32.png) [@peteslate2001](https://forums.toadworld.com/u/peteslate2001)\
**Post date:** [October 23, 2021, 3:29pm UTC](https://forums.toadworld.com/t/export-data-results-and-code-to-excel/53898/1 "2021-10-23T15:29:37Z")

</div>

Hi everyone - I'm sure this has been asked here many times before, but I searched and couldn't find an answer. Sorry if this a repost.

I'm using Toad Data Point 5.1.6.206 (64bit).

After running a query and getting the results, is there a way I can export the data and the SQL query to Excel at the same time? I run many reports, and I'd like to be able to include the query for each report on another tab in Excel.

Any help is appreciated. Thank you!

---

<div class="post-metadata">

**Author:** ![Gary.Jerep](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/gary.jerep/32/205_2.png) [@Gary.Jerep](https://forums.toadworld.com/u/Gary.Jerep)\
**Post date:** [October 26, 2021, 4:58pm UTC](https://forums.toadworld.com/t/export-data-results-and-code-to-excel/53898/2 "2021-10-26T16:58:09Z")

</div>

Right-click off your data grid contents and choose the Export Wizard, and then check the "Include SQL Statement" box per snap below.

Second snap shows that you'll get two tabs in your Excel workbook, one has the data, and the other has the SQL statement used to create the data.

 ![image](https://global.discourse-cdn.com/quest/original/2X/0/0e87d4eaffdb3448762af36fbd2aef32d0037b71.png)

 ![image](https://global.discourse-cdn.com/quest/original/2X/1/13b3b4df541563918d53160e93f41c9df395720a.png)

---

<div class="post-metadata">

**Author:** ![peteslate2001](https://avatars.discourse-cdn.com/v4/letter/p/eb9ed0/32.png) [@peteslate2001](https://forums.toadworld.com/u/peteslate2001)\
**Post date:** [October 27, 2021, 2:28pm UTC](https://forums.toadworld.com/t/export-data-results-and-code-to-excel/53898/3 "2021-10-27T14:28:05Z")

</div>

Gary.Jerep - Thank you so much for the information and screenshots. That worked perfectly.

I noticed some other options in the menu that could be beneficial to me, so I will be taking a look at those as well.

Much appreciated!
