I saw that there was a way to autofit rows in the worksheet. But I only want to autofit the rows that have only merged cells in it. And keep all of the other rows the same. Not sure if there is a way to do this.
I've tried this but it autofits all rows.
AutoFitterOptions options = new AutoFitterOptions();
options.AutoFitMergedCells = true;
_worksheet.AutoFitRows(options);
And I won't know the exact row that needs to be autofitted because I'm adding data to the excel sheet.
Please try the following sample code for your needs:
e.g.
Sample code:
Hope, this helps a bit.
You may also post your queries in dedicated forums.
PS. I am working as Support developer/ Evangelist at Aspose.