# Excel header please!

**URL:** <https://forum.uipath.com/t/excel-header-please/501303>\
**Category:** Activities\
**Tags:** question, excel, activities\
**Created:** [December 22, 2022, 5:39pm UTC](https://forum.uipath.com/t/excel-header-please/501303 "2022-12-22T17:39:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![khaled\_emad](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/khaled_emad/32/274207_2.png) [@khaled\_emad](https://forum.uipath.com/u/khaled_emad)\
**Post date:** [December 22, 2022, 5:39pm UTC](https://forum.uipath.com/t/excel-header-please/501303/1 "2022-12-22T17:39:20Z")

</div>

# Excel header please !

## Use Case Description

How can I add headers to the excel sheet I created from a Datatable. and avoid the loop to add it between every row?  
So what i am trying to do is to check if the excel sheet has empty rows to write range if no to append

thanks

## AS-IS WORKFLOW, TO-BE WORKFLOW

`-`

## Other information about the use case

**Industry categories for this use case** : Information Technology and Services, Logistic

**Skill level required** : Intermediate

**UiPath Products that were used** : UiPath Studio

**Other applications that were used** : -

**Other resources** : -

**What is the top ROI driver for this use case?** : Increase employee engagement

---

<div class="post-metadata">

**Author:** ![Anil\_G](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anil_g/32/524291_2.png) [@Anil\_G](https://forum.uipath.com/u/Anil_G)\
**Post date:** [December 22, 2022, 6:07pm UTC](https://forum.uipath.com/t/excel-header-please/501303/2 "2022-12-22T18:07:06Z")

</div>

@khaled_emad

First read the data from excel and have add headers unchecked…if dt.rowcount\>1(because header might be present so checking 1)

Then use write range else use append range

Cheers

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [December 25, 2022, 6:08pm UTC](https://forum.uipath.com/t/excel-header-please/501303/3 "2022-12-25T18:08:06Z")

</div>

Closed on December 25, 2022, 6:08pm UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
