Free Support Forum -

How to disable macro/how to get only non-hidden columns while reading excel data


I am using Aspose cells (

I am reading data from a excel file which have macro on load (which actully ask for some option to check and depend on option it hides some columns of the sheet)

In my code i am reading the columns untill i found a blank cell in perticular row (say header row)

and later reading data from this columns to the get values the columns.

Now,i have used the cells.getColumnWidth() method but it is not returning zero for the hidden column.

Is there any way i can either disable the macro ( because if i directly open excel sheet with macro disable it do not show me the hidden column) or get the columns that are not hidden by macro.

(without unprotecting the sheet)


Thanks for considering Aspose.

Well, currently we won't support to disable macros / manipulate macros althought you may remove macros in your workbook using Workbook.RemoveMacro() method.

Since your are using some older version of Aspose.Cells, Could you try the attached version and tell us if it works fine to get zero for the hide columns.

Thank you.