Пример #1
0
        protected override OfficeDocument Open(System.IO.FileInfo file, String contentid, String rep)
        {
            Excel.Workbook          workbook       = application.Workbooks.Open(file.FullName, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing);
            Excel2010OfficeDocument officeDocument = new Excel2010OfficeDocument(workbook);

            officeDocument.SaveContentProperties(contentid, rep);
            return(officeDocument);
        }
Пример #2
0
        private void ActivateDocument(Excel.Workbook workbook)
        {
            OfficeDocument officeDocument = new Excel2010OfficeDocument(workbook);

            if (officeDocument.IsPublished)
            {
                if (MenuListener != null)
                {
                    OfficeApplication.MenuListener.DocumentPublished();
                }
            }
            else
            {
                if (MenuListener != null)
                {
                    OfficeApplication.MenuListener.NoDocumentPublished();
                }
            }
        }