// Create a new workbook Workbook workbook = new Workbook(); IWorksheet worksheet = workbook.getWorksheets().get(0); worksheet.getRange("A1").setValue(100); worksheet.getRange("C1").setFormula("=$A$1"); worksheet.getRange("E1:E5").setFormula("=$A$1"); for (IRange item : worksheet.getRange("A1").getDependents()) { item.getInterior().setColor(Color.GetAzure()); } // Save to an excel file workbook.save("Dependents.xlsx");