How get the actual fontstyle of a cell ?

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

  • Posted 8 September 2017, 2:00 pm EST

    I try to build a project in vb.net to simulate the excell features, like set bold,italic,underline to the group of cell in the sheet, but first of all, i need know the original fontstyle of the cell

     the question is how can get the original fontstyle of the cell???? Crying

     ps.

    I Check the Fairpoint Excell simulation in C# but i can't found that routine Confused

     

    Regards

     

    RB

  • Replied 8 September 2017, 2:00 pm EST

    Hello,

    In order to know the Font Style of a cell you may use cell's Font Style property e.g.

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            MsgBox(FpSpread1.Sheets(0).Cells(1, 1).Font.Style)
    End Sub

     It gives the enumeration values as integer. which can be converted to corresponding value as follows : Regular=0, Bold=1, Italic=2, Underline=4, Strikeout=8.

     

    I hope it helps.

    Thanks,

     

  • Replied 8 September 2017, 2:00 pm EST

    Thanks DeepakSharma

    I will try !

     

Need extra support?

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

Learn More

Forum Channels