Beispiel #1
0
        internal override void Read(Stream is1)
        {
            //Initialize the supeclass with a blank worksheet
            base.Read(new MemoryStream(BLANK_WORKSHEET));

            try
            {
                chartsheet = ChartsheetDocument.Parse(is1).GetChartsheet();
            }
            catch (XmlException e)
            {
                throw new POIXMLException(e);
            }
        }
Beispiel #2
0
        internal override void Read(Stream is1)
        {
            //Initialize the supeclass with a blank worksheet
            base.Read(new MemoryStream(BLANK_WORKSHEET));

            try
            {
                XmlDocument doc = ConvertStreamToXml(is1);
                chartsheet = ChartsheetDocument.Parse(doc, XSSFSheet.NamespaceManager).GetChartsheet();
            }
            catch (XmlException e)
            {
                throw new POIXMLException(e);
            }
        }
Beispiel #3
0
 public static CT_Chartsheet Parse(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     if (node == null)
         return null;
     CT_Chartsheet ctObj = new CT_Chartsheet();
     foreach (XmlNode childNode in node.ChildNodes)
     {
         if (childNode.LocalName == "sheetPr")
             ctObj.sheetPr = CT_ChartsheetPr.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "sheetViews")
             ctObj.sheetViews = CT_ChartsheetViews.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "sheetProtection")
             ctObj.sheetProtection = CT_ChartsheetProtection.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "customSheetViews")
             ctObj.customSheetViews = CT_CustomChartsheetViews.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "pageMargins")
             ctObj.pageMargins = CT_PageMargins.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "pageSetup")
             ctObj.pageSetup = CT_CsPageSetup.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "headerFooter")
             ctObj.headerFooter = CT_HeaderFooter.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "drawing")
             ctObj.drawing = CT_Drawing.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "legacyDrawing")
             ctObj.legacyDrawing = CT_LegacyDrawing.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "legacyDrawingHF")
             ctObj.legacyDrawingHF = CT_LegacyDrawing.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "picture")
             ctObj.picture = CT_SheetBackgroundPicture.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "webPublishItems")
             ctObj.webPublishItems = CT_WebPublishItems.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "extLst")
             ctObj.extLst = CT_ExtensionList.Parse(childNode, namespaceManager);
     }
     return ctObj;
 }
Beispiel #4
0
 public void SetChartsheet(CT_Chartsheet sheet)
 {
     this.sheet = sheet;
 }
Beispiel #5
0
 public ChartsheetDocument(CT_Chartsheet sheet)
 {
     this.sheet = sheet;
 }