GetPreferredRowHeight issue

Posted by: don on 2 January 2019, 12:03 am EST

    • Post Options:
    • Link

    Posted 2 January 2019, 12:03 am EST

    In the new version of spread (v12), the GetPreferredRowHeight will not return (hang) in the following condition. I have found a workaround, but can you look into this.

    1. Set a formula for the whole column, like the following.

      fpSpread1.Sheets(0).Columns(_colIndexTotalAppraisalCalc).Formula = “RC5 * RC6”
    2. Get the row height using the following.

      fpSpread1.Sheets(0).GetPreferredRowHeight(1)

    If you execute this more than once, spread hangs.

    If you set the formula using Cells, it works fine. like this.

    fpSpread1.Sheets(0).Cells(0, _colIndexTotalAppraisalCalc, totalRows - 1, _colIndexTotalAppraisalCalc).Formula = “RC5 * RC6”

    Turning Legacy to All or any other combination does not seem to help.

  • Posted 2 January 2019, 3:04 pm EST

    Hi,

    I used your given code but I couldn’t observe any unresponsive behavior. Can you please modify the attached sample so we can further investigate it?

    Thanks,

    Jitender

    PreferredRowHeight.zip

Need extra support?

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

Learn More

Forum Channels