https://bz.apache.org/bugzilla/show_bug.cgi?id=65882

            Bug ID: 65882
           Summary: Getting wrong border color
           Product: POI
           Version: 5.2.0-FINAL
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: major
          Priority: P2
         Component: XSSF
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 38190
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=38190&action=edit
Get the enum value of the border color of the cell

Set EXCEL's CELL border color, the enumeration value of border color obtained
through POI is incorrect

When I set the border color of the file name 3.xlsx to green, the obtained
border color is black

code show as below  

    public void getExcelBorderColor() throws IOException {
        String xlsx = "/Users/leo/Downloads/problem/3.xlsx";
        InputStream in = new FileInputStream(xlsx);
        XSSFWorkbook workbook = new XSSFWorkbook(in);
        XSSFSheet sheetAt = workbook.getSheetAt(0);
        for (Row row : sheetAt){
            if(row==null)continue;
            for (Cell cell:row) {
                System.out.println(cell.getCellStyle().getBottomBorderColor());
                System.out.println(cell.getCellStyle().getTopBorderColor());
                System.out.println(cell.getCellStyle().getLeftBorderColor());
                System.out.println(cell.getCellStyle().getRightBorderColor());
            }
        }
    }

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to