# Sql query output and excel

**URL:** <https://forum.uipath.com/t/sql-query-output-and-excel/4128>\
**Category:** Help\
**Tags:** excel, database, activities\
**Created:** [May 2, 2017, 11:47am UTC](https://forum.uipath.com/t/sql-query-output-and-excel/4128 "2017-05-02T11:47:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![akshay1212](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/akshay1212/32/176728_2.png) [@akshay1212](https://forum.uipath.com/u/akshay1212)\
**Post date:** [May 2, 2017, 11:47am UTC](https://forum.uipath.com/t/sql-query-output-and-excel/4128/1 "2017-05-02T11:47:41Z")

</div>

I want to paste the data from the result of query in sql server to an excel.Afterwards i need to filter that data in excel..So how to make automation of all this using UiPath? Any earliest help would be much appreciable. Thanks.

Regards,  
Asit

---

<div class="post-metadata">

**Author:** ![vvaidya](https://avatars.discourse-cdn.com/v4/letter/v/e56c9b/32.png) [@vvaidya](https://forum.uipath.com/u/vvaidya)\
**Post date:** [May 2, 2017, 12:56pm UTC](https://forum.uipath.com/t/sql-query-output-and-excel/4128/2 "2017-05-02T12:56:44Z")

</div>

1. Sql Connect Activity
2. Execute Query Activity → Output to Datatable  
3)) Sql Disconnect Activity
3. FIlter your Datatable (than in Excel)
4. Write Range activity to Write to Excel. (you can filter here also)

---

<div class="post-metadata">

**Author:** ![Saad\_rehman](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/saad_rehman/32/57386_2.png) [@Saad\_rehman](https://forum.uipath.com/u/Saad_rehman)\
**Post date:** [April 3, 2019, 7:30pm UTC](https://forum.uipath.com/t/sql-query-output-and-excel/4128/3 "2019-04-03T19:30:05Z")

</div>

vvaidya, can you elaborate with pictures in your comment. i am having hard time to perform this
