See attached sample: I create a table with merged ranges and cell borders. One cell (with blue background) has a long wrapped text, and it spans two cols.
AutoFitRows does not work for this cell.
AsposeCellsAutoFit.zip (4.5 KB)
I use the “AutoFitRows” approach which handles merged ranges:
AutoFitterOptions afo = new AutoFitterOptions();
afo.AutoFitMergedCellsType = AutoFitMergedCellsType.LastLine;
_workSheet.AutoFitRows(1, 1, afo);
But it does not work here.
This seems to be related to borders - if I remove them (set variable “bolSetBorders” to false in the sample), the behavior is as expected.
Do you have any ideas? Is it an error in my sample or a bug?
Best regards
Wolfgang