Spread Windows Forms 15.0
Spread Windows Forms 15.0 Product Documentation / Developer's Guide / Formulas in Cells / Specifying an External Reference in a Formula
In This Topic
    Specifying an External Reference in a Formula
    In This Topic

    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
    
    See Also