Tuesday 19 July 2016

Hide Column in Excel through X++

Something I really need to share since we could not find any reference on how to achieve the following: we create a new excel file and input a lot of data. Based on some parameters, columns need to be hidden. But how to achieve this? 

After creating a new worksheet, use the following line to hide the column. The number 26 indicates the column number: 

worksheet.columns().item(26).hidden(true);

No comments:

Post a Comment