Avatar

Level 3

The best solution i found to remove a column is this one :

in the Table initialize script, write :

Table1.columnWidths="30mm 30mm 0.001mm 30mm 29.977mm 30mm 30mm 30mm 29.763mm 30mm"

If you want to remove a column, you put 0.001mm as width, it won't appear on the screen nor on the sheet if you print it.

If you want to be more dynamic you can add conditions using variables as width for each columns.

Example :

If ( x == x ) then

    varColumn1 = 30mm

else

     varColumn1 = 0.001mm
endif

and then you call you .columnWidths using all your variables.

Using the unit of measure 'Point' instead of milimeter may give better results if you hide alot of columns.

I hope this answer may help some people!