Trusted Contributor.. mikaelbehrens Trusted Contributor..
Trusted Contributor..
437 views

How can I dynamically create sum formula cells in an Excel Report?

Jump to solution

I've just been learning how to create Excel Reports from the Excel Report Cookbook. I was successfully able to use a SQL query to populate a spreadsheet using the jt:forEach JETT tag in the template.

How can I insert new sum formula rows beneath each column of numbers that is returned? The number of rows returned by the SQL query varies.

0 Likes
1 Solution

Accepted Solutions
Trusted Contributor.. mikaelbehrens Trusted Contributor..
Trusted Contributor..

Re: How can I dynamically create sum formula cells in an Excel Report?

Jump to solution

I was able to create the sum formula cells quite easily. I used JETT formulas: $[SUM()] . Placed beneath each column of the jt:forEach block I wanted to sum. When JETT processed the template spreadsheet it put the SUMs after the forEach list and adjusted the cell ranges appropriately.

Mikael Behrens

2 Replies
Micro Focus Expert
Micro Focus Expert

Re: How can I dynamically create sum formula cells in an Excel Report?

Jump to solution

Hello Mikael,

My name is Bryan Trejos and I will assist you on this thread.

As I can see, you opened a support case about this matter (SD02323848). Also, on this case, you mentioned that you figured out the solution.

Kindly would you mind to share this solution? This could help other users that have the same concern in the future. 

I will be waiting for your kind response.

Thanks and Best Regards,

Bryan Trejos F. 

0 Likes
Trusted Contributor.. mikaelbehrens Trusted Contributor..
Trusted Contributor..

Re: How can I dynamically create sum formula cells in an Excel Report?

Jump to solution

I was able to create the sum formula cells quite easily. I used JETT formulas: $[SUM()] . Placed beneath each column of the jt:forEach block I wanted to sum. When JETT processed the template spreadsheet it put the SUMs after the forEach list and adjusted the cell ranges appropriately.

Mikael Behrens

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.