[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Map Control
   [Expand]Product Information
    Product Structure
    Getting Started
   [Expand]Spreadsheet Document
    Supported Formats
   [Expand]Cell Basics
    Defined Names
    Data Binding
    Data Validation
   [Expand]Data Presentation
    Data Grouping
   [Expand]Pivot Tables
   [Expand]Charts and Graphics
   [Expand]Mail Merge
    Operation Restrictions
    Find and Replace
   [Expand]Visual Elements
   [Expand]Keyboard Shortcuts
      How to: Access a Workbook
      How to: Create a New Workbook
      How to: Update External References in the Loaded Workbook
      How to: Clone a Workbook
      How to: Specify Document Properties
      How to: Merge Multiple Workbooks Into One Document
    [Expand]Rows and Columns
    [Expand]Import and Export Data
    [Expand]Data Binding
    [Expand]Mail Merge
    [Expand]Formatting Cells
    [Expand]Conditional Formatting
    [Expand]Group Data
    [Expand]Filter Data
    [Expand]Pivot Tables
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

How to: Update External References in the Loaded Workbook

When the SpreadsheetControl loads a workbook containing external references, they are added to the IWorkbook.ExternalWorkbooks collection. However, the external references created in this manner are not "live". The references contain cached data and the SpreadsheetControl cannot update them.

To make a reference updateable, it should be replaced with a reference to a workbook instance.

To create a workbook instance, a workbook file should be loaded to an instance of the Workbook class or to another SpreadsheetControl instance. Subsequently, the ExternalWorkbookCollection.Replace method is used to replace the cached reference with a live external reference.


Use of the Workbook class instance in production code requires a license to the Office File API or the DevExpress Universal Subscription.

A workbook name in the external reference should be identical to the WorkbookSaveOptions.CurrentFileName property of the referenced workbook instance when the workbook is added to the ExternalWorkbookCollection. That is, if the workbook instance is created by loading a file using a full path, the reference should contain the full path, e.g., 'C:\Temp[Book1.xlsx]Sheet1'!B3. The string with a reference created in this manner might be long and inconvenient. The Workbook.Options.Save.CurrentFileName property of a referenced workbook enables you to specify a name that is easier to read, for example, "MyExternalWorkBook". Replace the corresponding item of the ExternalWorkbookCollection with an instance of the workbook with a custom CurrentFileName, and use it in external references instead of the file name, e.g., [MyExternalWorkBook]Sheet1!B3.


You can also use the ExternalWorkbookCollection.Add or ExternalWorkbookCollection.Replace method with the alias parameter to specify a custom workbook name that can be used in external references instead of the original file name or when the external workbook is not saved to a file.

Is this topic helpful?​​​​​​​