I try to use the AutoFitterOptions for AutoFitRows in my program for autofitting merged cells but while it worked before, with the new version 7.0.1 of Aspose.Cells it seems that it doesn’t work anymore.
Here’s my sample code : var excel = new Workbook(); excel.Worksheets.Add(“test”);
excel.Worksheets[0].Cells[1, 1].PutValue("blablablba blabalbal test test test test test test test test test test test test ");
//Create the range for the merging cell and for applying the style var range = excel.Worksheets[0].Cells.CreateRange(1,1,1,2); range.Merge();
//Applying the text wrapping var style = excel.Worksheets[0].Cells[1, 1].GetStyle(); style.IsTextWrapped = true; var flag = new StyleFlag { All = true }; range.ApplyStyle(style, flag);
//Using the autofit with the options for the merged cells var options = new AutoFitterOptions { AutoFitMergedCells = true }; excel.Worksheets[0].AutoFitRows(options);
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.