// Create a new workbook Workbook workbook = new Workbook(); workbook.getWorksheets().get(0).getRange("B1").setFormula("='[SourceWorkbook.xlsx]Sheet1'!A1"); // create a new workbook as the instance of external workbook. Workbook workbook2 = new Workbook(); workbook2.getWorksheets().get(0).getRange("A1").setValue("Hello, World!"); // update the caches of external workbook data. for (String item : workbook.getExcelLinkSources()) { workbook.updateExcelLink(item, workbook2); } // Save to an excel file workbook.save("CrossWorkbookFormula.xlsx");