[]
        
(Showing Draft Content)

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:\\Mescius\\[Sum.xlsx]Sheet1'!.

Using Code

The following example references data from a file.

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

See Also

Formulas in Cells

Placing a Formula in Cells

Specifying a Cell Reference in a Formula

Specifying a Sheet Reference in a Formula

Using a Circular Reference in a Formula

Nesting Functions in a Formula

Recalculating and Updating Formulas Automatically

Finding a Value Using GoalSeek

Allowing the User to Enter Formulas

Creating and Using a Custom Name

Creating and Using a Custom Function

Creating and Using External Variable

Using the Array Formula

Working with the Formula Text Box

Setting up the Name Box

Using Language Package

Accessing Data from Header or Footer

Managing External Reference

Working With Dynamic Array Formulas