How to conditionally display/not display columns in Excel template? — Oracle Analytics

Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

How to conditionally display/not display columns in Excel template?

Received Response
32
Views
2
Comments

Summary

How to conditionally display/not display columns in Excel template?

Content

I have one sheet on my XSL template that has a table with 3 columns and I'm looping through the XML and display 1 or more sheets based on data in the xml.

For example, let's say the xml has three nodes that have the below values.

  • Open
  • Closed
  • Pending

I'm looping through these three nodes and create an xsl output that eventually will have three sheets,Open, Closed and Pending

My requirement is for the Closed sheet, I want to add 2 more columns to the table so it will have 5 columns.  Open and Pending still have only 3 columns.  How do I do it in the xls template?

Thanks

Answers

  • Hoang Luu
    Hoang Luu Rank 4 - Community Specialist

    In my example, I use three xml nodes but that number is dynamic.  It could have 6-7 nodes in the xml therefore I'll have 6-7 sheets in the output. Only the Closed sheet will have 5 columns in the table.  The rest will have only 3 column.

    So there's no way to be able to put in some kind of conditional statement?  Something like

    If the sheet is Closed then display the additional 2 columns.

    Something simple as that?

  • User910243567
    User910243567 Rank 6 - Analytics Lead

    My suggestion is build template in 3 sheets in same .xls, I am not sure how your .xml data is.?