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

     

     

  • Posted 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

    RBStick out tongue

  • Posted 15 October 2018, 3:57 pm EST

    how do you do this on c#?

Need extra support?

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

Learn More

Forum Channels