how to get the border style (Excel)



  • Hi,

    I am trying to identify the Cells with the border style(Diagonal lines) in a excel sheet. But I do not kown how?

    anyone here can help me out.

    Thanks a lots.

    Willyyan



  • excel macro record

    Range("B3:D5").Select

    Selection.Borders(xlDiagonalDown).LineStyle = xlNone

    Selection.Borders(xlDiagonalUp).LineStyle = xlNone

    With Selection.Borders(xlEdgeLeft)

    .LineStyle = xlContinuous

    .Weight = xlThin

    .ColorIndex = xlAutomatic

    End With

    (VB)



  • PRIEST schrieb:

    excel macro record

    Range("B3:D5").Select

    ...........
    (VB)

    Hi Priest

    thanks at first.

    I am not going to set the border style, but to get the border style in a given cell.

    for example some thing like that

    if (cell[1,2].borderstyle == diagnol)
    {
    //do the job
    }

    I do not know, how to write this Pseudocode in C#

    Thank you anyway



  • doesn't linestlye has .value?

    like cell.linestyle.value = xyz?


Anmelden zum Antworten