Hello Evelyn,
Thank you for contacting us.
You may use the UsedCellRange property in order to select only the columns in the used range. The following code snippet shows how to autofit the columns in the used range of some Worksheet instance:
I hope this is helpful. If you have any other questions or concerns please do not hesitate to contact us again.
Regards,
Deyan
the Telerik team
Thank you for contacting us.
You may use the UsedCellRange property in order to select only the columns in the used range. The following code snippet shows how to autofit the columns in the used range of some Worksheet instance:
worksheet.Columns[worksheet.UsedCellRange].AutoFitWidth();
I hope this is helpful. If you have any other questions or concerns please do not hesitate to contact us again.
Regards,
Deyan
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items