We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

AutoFitRow for Merged Cells - Any hack or suggestion?

I’m in dire need to auto resize a row based on the cell’s content for one of our project requirement. AutofitRow() and AutofitRows() works fine if the cells are not merged. But it will not work if the cells are merged. I know that this is a feature in Excel and not an issue with Aspose and it works as intended. But I’m in a situation that I need to autoresize cell blocks created by 2 or 3 merged rows. Please suggest any workaround or hack anyone has tried before to make this work. I’m hoping there will be a workaround for this.

Hi,

Well, Aspose.Cells for .NET follows MS Excel standards. For your information, if you have merged some cells in a single row autofit row(s) operation would work. But if you have merged cells in more than 1 row, autofit row(s) would not work.
If you could do it in MS Excel but not with Aspose.Cells for .NET, kindly provide us the template file here, we will still check it for your requirement.

Thank you.

Thanks Amjad.

I have mentioned in my previous question itself that I know that this is not the limitation of Aspose but of MS Excel.

However, I was looking for any hack or workaround to simulate AutofitRow() for merged cells from the community as many would have faced this before and I just wanted to know how they have handled that. If you had come across such case, please let me know. Thanks.