Hide columns in Excell template for pxGenerateExcelFile

Hi,

When using pxGenerateExcelFile, we pass in a excel template that defines what data to include. If we wanted some columns in the excel to be visible only when some conditions are met then it seams the only option to do this is to have another excel template, and chose the template dynamically.

This creates the need for multiple different templates, that all have to be managed seprately; e.g if a new row is added to the excel for all scenarios we then have to go edit every template we have.

Is there a better solution where we can have one template but define the conditions that have to be met for a column in the excel to be included.

Many thanks,

@JoelJ156 this question has been asked before but there is no OOTB method from what I can tell.

Dynamic Column Creation

Hiding Repeating grid’s columns based on some condition

Template Excel File with formula

Can we restrict number of columns on UI and have them all in export to excel ?

Dynamic Column Headers for excel and Values from different page list for rows

@JoelJ156

We can’t manipulate (hide/show) the columns based on the context. The workaround is to create multiple templates based on each scenario.

@RameshSangili

Thanks for the response, Ramesh. We ended up using that method, however it’s not a ideal solution as it causes a build up of multiple templates that have to be managed.

hopefully we will see a OOTB feature for this in the future.