Naming report xlsx sheet names

Is it possible to name sheet names in an XLSX report?
Currently, when I run the report, I use the report grouping to separate the data into separate sheets. The issue I'm having is that the sheet names are "Sheet0", "Sheet1", "Sheet2", etc. Ideally, this would be the Group name.

Here is my current script I am running.

	overrides = {"Report Dataset":self.getSibling("Table").props.filter.results.filteredDataSet}
	bytesArray = system.report.executeReport(path = "Report Name", project = "Inventory", parameters = overrides, fileType="xlsx")
	filename = "ReportName.xlsx"
	system.perspective.download(filename, bytesArray)

This works as stated, with the only issue being that I'm unable to rename the sheets using their group name.

This type of customization needs to be done directly with the Apache POI libraries, not with the reporting module. Consider scripting the spreadsheet generation from scratch.

My Tag Report Utility on the Exchange has code you can copy and paste for this.

FYI, system.dataset.toExcel takes a parameter sheetNames:

3 Likes

This looks like it would be a much easier solution. Thanks so much!

Do you know if there's a way also to have it transfer formatting, such as background color? Thinking at this point a pdf maybe a better approach.

I don't think there is, but I would love to be proven wrong.