@huichen,
Please note, in the new fix, we provide new API for your requirement about external references:
Cell.SetFormula(string formula, FormulaParseOptions options, object value)
For FormulaParseOptions, you may set CheckAddIn as false. To be compatible with older versions, by default this property is true. See the sample updated code segment which works fine as I tested:
e.g
Sample code:
Workbook worlbook = new Workbook();
Cells cells = worlbook.getWorksheets().get(0).getCells();
Cell cell = cells.get(0, 0);
FormulaParseOptions options = new FormulaParseOptions();
options.setCheckAddIn(false);
cell.setFormula("='File1.xlam'!myFormula()", options, null);
//cell.setFormula("='File1.xlam'!myFormula()");
System.out.println("original formula: " + cell.getFormula());
cell.setFormula("=myFormula()", options, null);
System.out.println("updated formula : " + cell.getFormula());
Hope, this helps a bit.