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

    <b>I try to build a project in 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</b>

    <b> the question is how can get the original fontstyle of the cell???? <img src="/emoticons/emotion-9.gif" alt="Crying" />

    <b> ps. </b>

    <b>I Check the Fairpoint Excell simulation in C# but i can't found that routine <img src="/emoticons/emotion-42.gif" alt="Confused" />

    <b> </b>

    <b>Regards </b>



  • Replied 8 September 2017, 2:00 pm EST


    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.



  • 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