How to auto adjust height of the cells which have wrap text property applied

Posted by: aditya.chauhan on 17 March 2025, 1:07 am EST

  • Posted 17 March 2025, 1:07 am EST

    i am using spread.net in my application in which reports use an excel sheet as a template

    so what if i have applied wrap text property to a column then how do i achieve this functionality where the height of the cell auto adjusts according to the content but only and only to the cells where wrap text was applied in the excel sheet

    do i have to iterate over every cell to check for the wrap text property

    is there not a way to automatically auto adjust the height of cells which have wrap text property enabled

  • Posted 18 March 2025, 12:43 pm EST

    Hi Aditya,

    This seems to be a duplicate case.

    We have addressed this issue based on the WinForms technology on the following support ticket: https://developer.mescius.com/forums/spread-winforms/how-to-auto-adjust-height-of-cells-which-have-wrap-text-property-applied

    This forum is specific to Spread.NET ASP.NET issues. We kindly request you confirm the technology so that we can proceed with this issue accordingly.

    Thanks & regards,

    Aastha

  • Posted 18 March 2025, 12:46 pm EST

    i am not completely sure but you could clarify this for both of the technologies as it can occur in both

  • Posted 20 March 2025, 12:51 pm EST

    Hi Aditya,

    We are currently discussing this issue with our developers. [Internal Tracking ID: SPNET-46771] We will update you soon on this.

    Thanks & Regards,

    Aastha

  • Posted 8 April 2025, 6:29 am EST

    Hi Aditya,

    The developers have informed us that Spread ASP.NET does not support sheetview.GetPreferredHeight() method. So, there’s currently no way to automatically adjust the row height to fit the content.

    We are sorry for the inconvenience caused.

    Thanks & regards,

    Aastha

  • Posted 13 June 2025, 4:26 am EST

    Only cells with WrapText = true need to be checked—then just call AutoFitRow() for those rows. No built-in automatic way, but a quick loop does the trick! Italian Brainrot Clicker

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels