Class ExcelExternalWorkbook
Inherited Members
Namespace: OfficeOpenXml.ExternalReferences
Assembly: EPPlus.dll
Syntax
public class ExcelExternalWorkbook : ExcelExternalLink
Properties
CachedNames
A collection of cached defined names in the external workbook
Declaration
public ExcelExternalNamedItemCollection<ExcelExternalDefinedName> CachedNames { get; }
Property Value
Type | Description |
---|---|
ExcelExternalNamedItemCollection<ExcelExternalDefinedName> |
CachedWorksheets
A collection of cached worksheets in the external workbook
Declaration
public ExcelExternalNamedItemCollection<ExcelExternalWorksheet> CachedWorksheets { get; }
Property Value
Type | Description |
---|---|
ExcelExternalNamedItemCollection<ExcelExternalWorksheet> |
CacheStatus
The status of the cache. If the UpdateCache()method fails this status is set to Failed If cache status is set to NotUpdated, the cache will be updated when the package is saved. UpdateCache() ErrorLog
Declaration
public eExternalWorkbookCacheStatus CacheStatus { get; }
Property Value
Type | Description |
---|---|
eExternalWorkbookCacheStatus |
ExternalLinkType
Declaration
public override eExternalLinkType ExternalLinkType { get; }
Property Value
Type | Description |
---|---|
eExternalLinkType |
Overrides
ExternalLinkUri
The Uri to the external workbook. This property will be set by the File property on save, if it has been set.
Declaration
public Uri ExternalLinkUri { get; set; }
Property Value
Type | Description |
---|---|
System.Uri |
File
If the external reference is a file in the filesystem
Declaration
public FileInfo File { get; set; }
Property Value
Type | Description |
---|---|
System.IO.FileInfo |
Package
A reference to the external package, it it has been loaded. Load()
Declaration
public ExcelPackage Package { get; }
Property Value
Type | Description |
---|---|
ExcelPackage |
Methods
Load()
Tries to Loads the external package using the External Uri into the Package property
Declaration
public bool Load()
Returns
Type | Description |
---|---|
System.Boolean | True if the load succeeded, otherwise false. If false, see ErrorLog |
Load(ExcelPackage)
Tries to Loads the external package using the External Uri into the Package property
Declaration
public bool Load(ExcelPackage package)
Parameters
Type | Name | Description |
---|---|---|
ExcelPackage | package |
Returns
Type | Description |
---|---|
System.Boolean | True if the load succeeded, otherwise false. If false, see ErrorLog and CacheStatus of each ExcelExternalWorkbook |
Load(FileInfo)
Tries to Loads the external package using the External Uri into the Package property
Declaration
public bool Load(FileInfo packageFile)
Parameters
Type | Name | Description |
---|---|---|
System.IO.FileInfo | packageFile |
Returns
Type | Description |
---|---|
System.Boolean | True if the load succeeded, otherwise false. If false, see ErrorLog |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
UpdateCache()
Updates the external reference cache for the external workbook. To be used a Package must be loaded via the Load() method. CacheStatus ErrorLog
Declaration
public bool UpdateCache()
Returns
Type | Description |
---|---|
System.Boolean | True if the update was successful otherwise false |