The steps are:
- Create a new custom report in Administration. Make sure Excel is listed as one of the output formats
- Select HTML and Excel as available Report Formats
- Add a new custom section to the report
- In this custom section, add the ESQL query below in the Query section:
- Create a Template in the template section to render the report as a table (see example below)
- Go to Reports
- Choose your new report
- Choose MS-Excel as the output format
- Click on the button to generate the report
- You now have an Excel sheet with the required user list
If you want a list of just the email addresses, this article describes that process.
ESQL Query
select R.USER_ID, R.FIRST_NAME + ' ' + R.LAST_NAME as FULL_NAME, R.USER_NAME, R.EMAIL_ADDRESS, R.IS_ACTIVE from SpiraTestEntities.R_Users as R where R.IS_ACTIVE = True
Example XSLT Template
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
<xsl:template match="/RESULTS">
<table class="DataGrid" style="width:100%">
<tr>
<th>User ID</th>
<th>Full Name</th>
<th>Username</th>
<th>Email address</th>
<th>Is Active?</th>
</tr>
<xsl:for-each select="ROW">
<tr>
<td>
<xsl:value-of select="USER_ID"/>
</td>
<td>
<xsl:value-of select="FULL_NAME"/>
</td>
<td>
<xsl:value-of select="USER_NAME"/>
</td>
<td>
<xsl:value-of select="EMAIL_ADDRESS"/>
</td>
<td>
<xsl:value-of select="IS_ACTIVE"/>
</td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>