How can I do to AutoFit the columns to the cell contents?

Posted by: robertobonilla2007 on 8 September 2017, 2:39 pm EST

  • Posted 8 September 2017, 2:39 pm EST

    I have Columns with the standard width, but I need for a range the Columns Autofit to the cell Contens

    How can i do?

    Thanks in Advance

    Regards

    RB

     

     

    <img alt=""><img alt="">
  • Replied 8 September 2017, 2:39 pm EST

    Finally I Found the way to do it!

    Here the Code

                    Dim colP As FarPoint.Win.Spread.Column
                    Dim size As Single
                    colP = FpSpread1.ActiveSheet.Columns(Num_Col)
                    size = colP.GetPreferredWidth()
                    colP.Width = size

     Regards

    RB<img src="/emoticons/emotion-4.gif" alt="Stick out tongue" />

Need extra support?

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

Learn More

Forum Channels