Hi again,
Please note, Style.isModified method needs a reference of the type of formatting which we need to inquire. In order to do so, we pass on the appropriate value from StyleModifyFlag class to the Style.isModified method. In this scenario you wish to retrieve the information about borders therefore we have used the LeftBorder, BottomBorder etc.
Regarding the second part of your inquiry, if you check the code snippet provided in my previous post, you will notice that the Style object was retrieved from an instance of Cell, that means, the Style object is already associated with the Cell object therefore all further inquiries will be in the same context.
If you wish to retrieve the color or line style of the border then you can do it as follow. Please note, the Border.LineStyle property returns an integer value which corresponds to the CellBorderType class. Moreover, custom line weight neither can be set nor retrieved using Aspose.Cells APIs.
Please check the following documents for your kind reference.
Java
Workbook book = new Workbook(dir + “book1.xlsx”);
Worksheet sheet1 = book.getWorksheets().get(0);
Cells cells1 = sheet1.getCells();
Style style = cells1.get(“A2”).getDisplayStyle();
Border border = style.getBorders().getByBorderType(BorderType.BOTTOM_BORDER);
System.out.println(border.getColor() + " " + border.getLineStyle());