Spread Windows Forms 12.0 Product Documentation
Specifying an External Reference in a Formula

You can use external references in formulas, such as data from an xlsx file.

The external reference uses the file name and sheet. For example: 'C:\\GrapeCity\\[Sum.xlsx]Sheet1'!.

Using Code

The following example references data from a file.

C#
Copy Code
fpSpread1.Sheets[0].SetFormula(0, 0, "SUM('C:\\Program Files (x86)\\GrapeCity\\[Sum.xlsx]Sheet1'!A1:A4)");
fpSpread1.AllowUserFormulas = true;
VB
Copy Code
FpSpread1.Sheets(0).SetFormula(0, 0, "SUM('C:\Program Files (x86)\GrapeCity\[Sum.xlsx]Sheet1'!A1:A4)")
FpSpread1.AllowUserFormulas = True