Class ExcelExternalWorkbook
- Namespace
- OfficeOpenXml.ExternalReferences
- Assembly
- EPPlus.dll
Represents an external workbook.
public class ExcelExternalWorkbook : ExcelExternalLink
- Inheritance
-
ExcelExternalWorkbook
- Inherited Members
Properties
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
public eExternalWorkbookCacheStatus CacheStatus { get; }
Property Value
CachedNames
A collection of cached defined names in the external workbook
public ExcelExternalNamedItemCollection<ExcelExternalDefinedName> CachedNames { get; }
Property Value
CachedWorksheets
A collection of cached worksheets in the external workbook
public ExcelExternalNamedItemCollection<ExcelExternalWorksheet> CachedWorksheets { get; }
Property Value
ExternalLinkType
Sets the external link type
public override eExternalLinkType ExternalLinkType { get; }
Property Value
ExternalLinkUri
The Uri to the external workbook. This property will be set by the File property on save, if it has been set.
public Uri ExternalLinkUri { get; set; }
Property Value
- Uri
File
If the external reference is a file in the filesystem
public FileInfo File { get; set; }
Property Value
IsPathRelative
If true, sets the path to the workbook as a relative path on Load(), if the link is on the same drive. Otherwise set it as an absolute path. If set to false, the path will always be saved as an absolute path. If the file path is relative and the file can not be found, the file path will not be updated. Load() File
public bool IsPathRelative { get; set; }
Property Value
Package
A reference to the external package, it it has been loaded. Load()
public ExcelPackage Package { get; }
Property Value
Methods
Load()
Tries to Loads the external package using the External Uri into the Package property
public bool Load()
Returns
Load(ExcelPackage)
Tries to Loads the external package using the External Uri into the Package property
public bool Load(ExcelPackage package)
Parameters
package
ExcelPackage
Returns
- bool
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
public bool Load(FileInfo packageFile)
Parameters
packageFile
FileInfo
Returns
ToString()
String representation
public override string ToString()
Returns
UpdateCache()
Updates the external reference cache for the external workbook. To be used a Package must be loaded via the Load() method. CacheStatus ErrorLog
public bool UpdateCache()
Returns
- bool
True if the update was successful otherwise false