XLSX Handlebar, am I able to dynamically display columns?



  • https://playground.jsreport.net/w/anon/5wqci830

    For the XLSX Recipe, Am I able to add display logic that renders a column dynamically?

    If the a column has all null values, to hide the header + columns associated. Only display a column when there is at least one cell under the headers with a value?

    For example with my playground: since Dynamic 2 Field has all empty values, is it possible to hide this column entirely?

    Please share any relevant existing playgrounds with an example. Thanks!


  • administrators

    hi! this is not possible right now.

    to be able to do what you want, we will need to generate dynamic cells from both directions, right now you can generate cells horizontally (using the each loop, just like in your example), and generate cells vertically (using {{#each items vertical=true}} and placing the end of loop vertically)

    0_1741892470501_Screenshot 2025-03-13 at 2 .01.03@2x.jpg

    support for generating the cells from both directions is not yet possible, you can subscribe here for updates about this feature, we will try to increase the priority for it, but no promises



  • thanks for the quick response!

    okay that is what i figured when playing around with the xlsx recipe. just to clarify, this recipe allows generating dynamic cells from EITHER horizontal or vertical but NOT both?

    again, thanks for the response and will definitely subscribe for future updates (just in case)! thanks again!


  • administrators

    okay that is what i figured when playing around with the xlsx recipe. just to clarify, this recipe allows generating dynamic cells from EITHER horizontal or vertical but NOT both?

    yes, we recently introduced the support for vertical loop, so it is matter of time to introduce the mode to produce cells in both directions and have fully dynamic cells support.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.