/// <summary> /// Creates a new instance of the ExcelWorkbook class. /// </summary> /// <param name="package">The parent package</param> /// <param name="namespaceManager">NamespaceManager</param> internal ExcelWorkbook(ExcelPackage package, XmlNamespaceManager namespaceManager) : base(namespaceManager) { _package = package; WorkbookUri = new Uri("/xl/workbook.xml", UriKind.Relative); SharedStringsUri = new Uri("/xl/sharedStrings.xml", UriKind.Relative); StylesUri = new Uri("/xl/styles.xml", UriKind.Relative); _names = new ExcelNamedRangeCollection(this); _namespaceManager = namespaceManager; TopNode = WorkbookXml.DocumentElement; SchemaNodeOrder = new string[] { "fileVersion", "fileSharing", "workbookPr", "workbookProtection", "bookViews", "sheets", "functionGroups", "functionPrototypes", "externalReferences", "definedNames", "calcPr", "oleSize", "customWorkbookViews", "pivotCaches", "smartTagPr", "smartTagTypes", "webPublishing", "fileRecoveryPr", }; FullCalcOnLoad = true; //Full calculation on load by default, for both new workbooks and templates. GetSharedStrings(); }
public virtual void Reload() { _values = _excelDataProvider.GetWorkbookNameValues(); }
/// <summary> /// Creates a new instance of the ExcelWorkbook class. For internal use only! /// </summary> /// <param name="xlPackage">The parent package</param> /// <param name="namespaceManager">NamespaceManager</param> internal ExcelWorkbook(ExcelPackage xlPackage, XmlNamespaceManager namespaceManager) : base(namespaceManager) { _package = xlPackage; _names = new ExcelNamedRangeCollection(this); CreateWorkbookXml(); TopNode = WorkbookXml.DocumentElement; SchemaNodeOrder = new string[] { "fileVersion", "workbookPr", "workbookProtection", "bookViews", "sheets", "definedNames", "calcPr", "pivotCaches" }; GetSharedStrings(); }
public EpplusNameValueProvider(ExcelDataProvider excelDataProvider) { _excelDataProvider = excelDataProvider; _values = _excelDataProvider.GetWorkbookNameValues(); }