# Export report data to excel in single sheet

**URL:** <https://forum.inductiveautomation.com/t/export-report-data-to-excel-in-single-sheet/56030>\
**Category:** Ignition\
**Created:** [February 11, 2022, 12:07pm UTC](https://forum.inductiveautomation.com/t/export-report-data-to-excel-in-single-sheet/56030 "2022-02-11T12:07:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![prasath.t](https://avatars.discourse-cdn.com/v4/letter/p/898d66/32.png) [@prasath.t](https://forum.inductiveautomation.com/u/prasath.t)\
**Post date:** [February 11, 2022, 12:07pm UTC](https://forum.inductiveautomation.com/t/export-report-data-to-excel-in-single-sheet/56030/1 "2022-02-11T12:07:21Z")

</div>

Hi ,  
I have a Report viewer In that i am having Report in 5 pages.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/f/cf72ddbf71b2cff3dba0be12d36a655515ddb9a1.png)

I want to export the data to excel for that i am using this script

```auto
format = event.source.parent.getComponent('Dropdown_Format').selectedStringValue
window = system.gui.getWindow("EMS/EMS_Dynamic_Report")
if format == "Excel":
	window.getComponentForPath("Root Container.Report Viewer").saveAsXlsx("Daily Report")

```

when I save it, i am getting data with **5 Sheets**. **but i want to export the data to excel in single sheet**

**i want to export the 5pages data in to single sheet in excel**  
@paul-griffith  
how to do that… can any one help

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 11, 2022, 3:32pm UTC](https://forum.inductiveautomation.com/t/export-report-data-to-excel-in-single-sheet/56030/2 "2022-02-11T15:32:16Z")

</div>

You can’t.  
Excel and CSV report exports are translations of the primary purpose of reporting - a document format.

If you want a ‘single page’ output, you need to have a single page _report_ - you can set a custom, extremely tall size to avoid wrapping. That then makes it impractical to use as a standard report, but that’s just the nature of reporting.

Think of it this way: If you had _two_ tables in your report, how would they end up in an XML export? What if you have multiple defined pages, each with their own tables that can grow to multiple pages?  
Exporting to Excel or CSV is by definition a lossy, fragile venture. I would recommend building a secondary function to query for the same _data_ that you’re using a report to display, and just directly export is using `system.dataset.toExcel`, where you have greater control over the output.

---

<div class="post-metadata">

**Author:** ![prasath.t](https://avatars.discourse-cdn.com/v4/letter/p/898d66/32.png) [@prasath.t](https://forum.inductiveautomation.com/u/prasath.t)\
**Post date:** [February 11, 2022, 3:53pm UTC](https://forum.inductiveautomation.com/t/export-report-data-to-excel-in-single-sheet/56030/3 "2022-02-11T15:53:56Z")

</div>

thanks for your response. i will try it out
