# How to get Report script to put data on one sheet

**URL:** <https://forum.inductiveautomation.com/t/how-to-get-report-script-to-put-data-on-one-sheet/82538>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [November 30, 2023, 3:48pm UTC](https://forum.inductiveautomation.com/t/how-to-get-report-script-to-put-data-on-one-sheet/82538 "2023-11-30T15:48:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![christopher.carruthe](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@christopher.carruthe](https://forum.inductiveautomation.com/u/christopher.carruthe)\
**Post date:** [November 30, 2023, 3:48pm UTC](https://forum.inductiveautomation.com/t/how-to-get-report-script-to-put-data-on-one-sheet/82538/1 "2023-11-30T15:48:11Z")

</div>

I'm using system.report.executeAndDistribute to save an Excel file to a shared location on a server. It puts about 38 rows of data on a sheet, then creates another sheet for the next 38 rows. With over 3000 rows of data, that's a lot of sheets. Is there some way to have Ignition put all the data into one sheet? I know there's a way to do this conversion in Excel, but I'd rather not put that on the user. I've tried both XLS and XLSX file types. Using Vision, version 8.1.33.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 30, 2023, 3:52pm UTC](https://forum.inductiveautomation.com/t/how-to-get-report-script-to-put-data-on-one-sheet/82538/2 "2023-11-30T15:52:21Z")

</div>

Is there a particular reason you are using a report to do this? If you only need the table data, you can use [system.dataset.exportExcel()](https://docs.inductiveautomation.com/display/DOC81/system.dataset.exportExcel) to generate your file from a simple dataset.

If you need something more advanced, you can use the Apache POI java library that comes with Ignition to generate any arbitrary content in Excel you like.

---

<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:** [November 30, 2023, 4:11pm UTC](https://forum.inductiveautomation.com/t/how-to-get-report-script-to-put-data-on-one-sheet/82538/3 "2023-11-30T16:11:53Z")

</div>

In other words, _via reporting_, the only way you can change the output format is by literally making the report "page" tall enough to fit all the rows.

Reports are really not designed to export to Excel; they're meant to be documents, not structured data. If you want structured data, you should deliberately export structured data using one of the approaches Phil mentioned.

---

<div class="post-metadata">

**Author:** ![christopher.carruthe](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@christopher.carruthe](https://forum.inductiveautomation.com/u/christopher.carruthe)\
**Post date:** [December 1, 2023, 7:31pm UTC](https://forum.inductiveautomation.com/t/how-to-get-report-script-to-put-data-on-one-sheet/82538/4 "2023-12-01T19:31:50Z")

</div>

Thanks to both of you for your answers. We want to auto-generate reports. I'd done one with a PDF showing a trend chart. My mind just followed the Report module path for the XLS file. I think the system.dataset.toExcel is what we'll probably use.

I'm not clear on how the Apache POI java library comes with Ignition. There's nothing in the Ignition online manual, though I found some general references on the internet.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 1, 2023, 7:37pm UTC](https://forum.inductiveautomation.com/t/how-to-get-report-script-to-put-data-on-one-sheet/82538/5 "2023-12-01T19:37:05Z")

</div>

> [@christopher.carruthe](#):
>
> I'm not clear on how the Apache POI java library comes with Ignition.

It's how Ignition accomplishes `system.dataset.exportExcel()`. But since the libraries are present in the system as jars, and jython lets you use java classes near-natively, you can write your own, completely arbitrary, Excel file generation scripts.

IA doesn't document things that it doesn't want to take support calls for. But that doesn't mean you **can't** do those things. Look on this forum for Apache POI examples.

---

<div class="post-metadata">

**Author:** ![christopher.carruthe](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@christopher.carruthe](https://forum.inductiveautomation.com/u/christopher.carruthe)\
**Post date:** [December 4, 2023, 4:12pm UTC](https://forum.inductiveautomation.com/t/how-to-get-report-script-to-put-data-on-one-sheet/82538/6 "2023-12-04T16:12:44Z")

</div>

Phil - That's very helpful. On a side note, my sincere thanks to you for generously sharing your expertise with the community!
