Skip to main content
Skip table of contents

if (XLSX)

An Excel content command that makes the contents of its host Name's area conditional.

This command has a priority of 1000.

Syntax:

if(test,collapse)

With required attributes only:

if(test)

Attributes

#1 - test

Required

Value type

EL-evaluated

Yes

Boolean

Yes

Defines the conditional expression. Should the resolved value be a Boolean true, the host Name's area's cells remain unaltered, otherwise the cells are deleted and any other content commands in the host Name are disabled.

#2 - collapse

Required

Value type

EL-evaluated

No

Boolean

Yes

Defines if any cell contents below the host Name's area will be "pulled" upwards, should test resolve into false and the host Name's area's cells deleted. If the resolved value is true, any contents below will be shifted up as many rows as the host Name's area's height is, otherwise the contents will remain in place.

If undefined, the value of false is used.

Examples

The if command can be used individually or together with other content commands - its high priority will ensure it is always evaluated first, disabling any of the other commands of its host Name should content removal occur.

CODE
if(displayReport) reportTable(report)

The second attribute collapse is there to help with controlling space in the composed result. Have it resolved into true to have contents below its Name's area to take up the area's space should test resolve into false.

CODE
if(showFiller,true)
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.