Hiding a crosstab columns in Excel

MKI
MKI
edited February 11, 2022 in Analytics #1
I want to hide two of the crosstab columns based on some condition. I have been able to achieve it by using

function onPrepareCell( cell, reportContext )
if(some condition){
if( cell.getCellID() == cell#){
cell.getStyle().setDisplay("none");
}
}

in the onPrepare event of cross tab. It works fine in PDF,HTML format but the columns are not getting hidden when the format is Excel. I need to get this done soon please help

Comments

  • JasonW
    edited December 31, 1969 #2
    Can you try this in the onCreate instead of the onPrepareCell?

    if( cellInst.getCellID() == 97){
    cellInst.getStyle().setDisplay("none");

    }
    Jason
  • MKI
    MKI
    edited October 10, 2012 #3
    @JasonW

    I already did but it is not working....

    I think the solution is to set the width of the cell to '0' but the problem is there is no setter method to set the width of the cell from the script