コード例 #1
0
        /// <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", };
            GetSharedStrings();
        }
コード例 #2
0
ファイル: ExcelWorkbook.cs プロジェクト: Stenrud/EPPlus
        /// <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);
            ThemeUri         = new Uri("/xl/theme/theme1.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", "webPublishObjects", "extLst" };
            FullCalcOnLoad    = true;       //Full calculation on load by default, for both new workbooks and templates.
            GetSharedStrings();
        }