# Write to Excel file in the control machine

**URL:** <https://forum.ansible.com/t/write-to-excel-file-in-the-control-machine/37961>\
**Category:** Ansible Project\
**Created:** [May 4, 2023, 4:29am UTC](https://forum.ansible.com/t/write-to-excel-file-in-the-control-machine/37961 "2023-05-04T04:29:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prady\_A](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/prady_a/32/4792_2.png) [@Prady\_A](https://forum.ansible.com/u/Prady_A)\
**Post date:** [May 4, 2023, 4:29am UTC](https://forum.ansible.com/t/write-to-excel-file-in-the-control-machine/37961/1 "2023-05-04T04:29:35Z")

</div>

Hello guys,

Could you please suggest what would be the best approach to create an excel file in control node of the provided hostnames in the ansible playbook command.

Thanks  
Pradyumna

---

<div class="post-metadata">

**Author:** ![area51coder](https://avatars.discourse-cdn.com/v4/letter/a/a88e57/32.png) [@area51coder](https://forum.ansible.com/u/area51coder)\
**Post date:** [May 4, 2023, 8:08am UTC](https://forum.ansible.com/t/write-to-excel-file-in-the-control-machine/37961/2 "2023-05-04T08:08:47Z")

</div>

Hello Pradyumna,  
I have below playbook where i generate files in csv format for vmware inventory. please check if this kind or report you are looking, you can customise this according to your requirements.  
playbook on this github link.  
[https://github.com/area51coder/ansible\_group\_issues/tree/main/vmware\_csvreport](https://github.com/area51coder/ansible_group_issues/tree/main/vmware_csvreport)

Regards  
Ravi  
[yoursmartbook.blogspot.com](http://yoursmartbook.blogspot.com)

---

<div class="post-metadata">

**Author:** ![Prady\_A](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/prady_a/32/4792_2.png) [@Prady\_A](https://forum.ansible.com/u/Prady_A)\
**Post date:** [May 4, 2023, 1:12pm UTC](https://forum.ansible.com/t/write-to-excel-file-in-the-control-machine/37961/3 "2023-05-04T13:12:23Z")

</div>

Hi Ravi,

Thank you for your kind reply.  
I am running the ansible playbook. anisible\_hostname var contains the hostname which needs to be updated in the excel sheet. Kindly find the attached excel file in JPEG format.  
The hostname are in the excel B,C,L,S column. Hostname are 1ld619 and 1ld620.  
Please suggest.

Regards  
Prady

> **(attachments)**
>
> ![Excel Image.jpeg](https://us1.discourse-cdn.com/ansible/original/2X/7/7201af53c627d4f7e56b6eacd82a6595c2969ce3.jpeg)
