Delete Columns


#1

We have a Excel Template with several columns. We want to delete now differently columns. Is there a possibility by API Columns to delete?

Thanks for you timely help in this matter.
Hans


#2

Dear Hans,

Currently this feature is not supported.

You can try an alternative solution: set the column width to 0. So this column is hidden. And you can put null value to cell which you want to delete.


#3

Dear Laurence,

thank you for the fast answer. With set the column width to 0 works it well.
How can I set the cell value to Null?

Regards
Hans


#4

Dear Hans,

You can try the following sample code:

Cells cells = excel.Worksheets[0].Cells;
cells[“B2”].PutValue(null);

So in Cell “B2”, the data you set in designer file is cleared.