Hi Bill,
Thanks for your interest in Essential XlsIO.
Yes, it is possible to determine the border properties of a cell.
1) Please refer the following code snippet to set the border [top, bottom, left and right] linestyle.
[C#]
// Setting Border LineStyle - Bottom
sourcesheet.Range["B2"].CellStyle.Borders[ ExcelBordersIndex.EdgeBottom ].LineStyle =ExcelLineStyle.Dash_dot;
// Setting Border Linestyle - Left
sourcesheet.Range["B2"].CellStyle.Borders[ ExcelBordersIndex.EdgeLeft ].LineStyle = ExcelLineStyle.Dash_dot;
// Setting Border Linestyle - Right
sourcesheet.Range["B2"].CellStyle.Borders[ ExcelBordersIndex.EdgeRight ].LineStyle = ExcelLineStyle.Dash_dot;
// Setting Border Linestyle - Top
sourcesheet.Range["B2"].CellStyle.Borders[ ExcelBordersIndex.EdgeTop ].LineStyle = ExcelLineStyle.Dash_dot;
2) Please refer the following code snippet to get the border information from a cell and then set the top border of cell of the destination sheet.
[C#]
//Applying the border linestyle to the destination sheet.
destsheet.Range["B2"].CellStyle.Borders[ExcelBordersIndex.EdgeTop].LineStyle=sourcesheet.Range["B2"].CellStyle.Borders[ ExcelBordersIndex.EdgeTop ].LineStyle;
Please refer the following sample which implements the above said feature:
Borders.zipPlease take a look and let me know if you have any other questions.
Best Regards,
Melba