// Create a new workbook Workbook workbook = new Workbook(); IWorksheet worksheet = workbook.getWorksheets().get(0); worksheet.getRange("A1:B2").setValue(new Object[][]{ {1, 2}, {"aaa", "bbb"} }); worksheet.getRange("A2:C3").getInterior().setColor(Color.GetGreen()); //style used range is A2:C3. IRange usedRange_style = worksheet.getUsedRange(EnumSet.of(UsedRangeType.Style)); usedRange_style.getInterior().setColor(Color.GetLightBlue()); // Save to an excel file workbook.save("GetFeatureRelatedUsedRange.xlsx");