Hi,
We are trying to Autofit columns based a specific range i.e. a table’s range. However the AutoFitColumns() method doesn’t have an overload that takes a range and an AutoFitterOption object.
Is there a reason why this is the case?
AutoFitColumns Overloads:
AutoFitColumns()
AutoFitColumns(AutoFitterOptions options)
AutoFitColumns(int firstColumn, int lastColumn)
AutoFitColumns(int firstColumn, int lastColumn, AutoFitterOptions options)
AutoFitColumns(int firstRow, int firstColumn, int lastRow, int lastColumn)
Why isn’t there an “AutoFitColumns(int firstRow, int firstColumn, int lastRow, int lastColumn, AutoFitterOptions options)” overload?
I asked because we don’t want the autofitcolumns method basing the width on an external cell (from a table) which could have content much longer than values in the table. If we opt for the option where we provide a range, we would end up revealing hidden columns, which is undesirable in our cases.
Is there any workaround that will allow us to keep our hidden columns hidden and auto fit only base on range. Suggestions would very much be appreciated if an overload isn’t coming in the future.
Thank you