I have observed the presentation and sample code shared by you. In your presentation the table has many merged columns. You can adopt the approach to remove the columns either using following sample code.
table.getColumns().removeAt(i - columnsDeleted, true);
The true means that you will also be deleting the associated rows and columns with this. Since you are deleting the columns in a loop, so you need to take care of the fact that sequential index may not work in this regard. The other option is to split all rows to actual columns first and then remove the particular columns from it using
table.getColumns().removeAt(i - columnsDeleted, false);
I suggest you to please visit this thread link for your convenience as well where by I have shared an approach to remove the merged row from table.
If you still find issue then please share the desired output table that you want to achieve after removing columns and I will help you further.