Exemplo n.º 1
0
 public void Set(CT_Sheet sheet)
 {
     this.nameField = sheet.nameField;
     this.sheetIdField = sheet.sheetIdField;
     this.stateField = sheet.stateField;
     this.idField = sheet.idField;
 }
Exemplo n.º 2
0
 public void Set(CT_Sheet sheet)
 {
     this.nameField    = sheet.nameField;
     this.sheetIdField = sheet.sheetIdField;
     this.stateField   = sheet.stateField;
     this.idField      = sheet.idField;
 }
Exemplo n.º 3
0
 public CT_Sheet InsertNewSheet(int index)
 {
     if (this.sheetField == null)
         this.sheetField = new List<CT_Sheet>();
     CT_Sheet newsheet = new CT_Sheet();
     this.sheetField.Insert(index, newsheet);
     return newsheet;
 }
Exemplo n.º 4
0
 public CT_Sheet AddNewSheet()
 {
     if (this.sheetField == null)
         this.sheetField = new List<CT_Sheet>();
     CT_Sheet newsheet = new CT_Sheet();
     this.sheetField.Add(newsheet);
     return newsheet;
 }
Exemplo n.º 5
0
 public CT_Sheet Copy()
 {
     CT_Sheet obj = new CT_Sheet();
     obj.idField = this.idField;
     obj.nameField = this.nameField;
     obj.stateField = this.stateField;
     return obj;
 }
Exemplo n.º 6
0
        public CT_Sheet Copy()
        {
            CT_Sheet obj = new CT_Sheet();

            obj.idField    = this.idField;
            obj.nameField  = this.nameField;
            obj.stateField = this.stateField;
            return(obj);
        }
Exemplo n.º 7
0
        public CT_Sheet InsertNewSheet(int index)
        {
            if (this.sheetField == null)
            {
                this.sheetField = new List <CT_Sheet>();
            }
            CT_Sheet newsheet = new CT_Sheet();

            this.sheetField.Insert(index, newsheet);
            return(newsheet);
        }
Exemplo n.º 8
0
        public CT_Sheet AddNewSheet()
        {
            if (this.sheetField == null)
            {
                this.sheetField = new List <CT_Sheet>();
            }
            CT_Sheet newsheet = new CT_Sheet();

            this.sheetField.Add(newsheet);
            return(newsheet);
        }
Exemplo n.º 9
0
 public static CT_Sheet Parse(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     if (node == null)
         return null;
     CT_Sheet ctObj = new CT_Sheet();
     ctObj.name = XmlHelper.ReadString(node.Attributes["name"]);
     ctObj.sheetId = XmlHelper.ReadUInt(node.Attributes["sheetId"]);
     if (node.Attributes["state"] != null)
         ctObj.state = (ST_SheetState)Enum.Parse(typeof(ST_SheetState), node.Attributes["state"].Value);
     ctObj.id = XmlHelper.ReadString(node.Attributes["id", PackageNamespaces.SCHEMA_RELATIONSHIPS]);
     return ctObj;
 }
Exemplo n.º 10
0
        public static CT_Sheet Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_Sheet ctObj = new CT_Sheet();

            ctObj.name    = XmlHelper.ReadString(node.Attributes["name"]);
            ctObj.sheetId = XmlHelper.ReadUInt(node.Attributes["sheetId"]);
            if (node.Attributes["state"] != null)
            {
                ctObj.state = (ST_SheetState)Enum.Parse(typeof(ST_SheetState), node.Attributes["state"].Value);
            }
            ctObj.id = XmlHelper.ReadString(node.Attributes["id", PackageNamespaces.SCHEMA_RELATIONSHIPS]);
            return(ctObj);
        }
Exemplo n.º 11
0
        public static CT_Sheets Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_Sheets ctObj = new CT_Sheets();

            ctObj.sheet = new List <CT_Sheet>();
            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "sheet")
                {
                    ctObj.sheet.Add(CT_Sheet.Parse(childNode, namespaceManager));
                }
            }
            return(ctObj);
        }
Exemplo n.º 12
0
        public void SerializeWorksheetDocumentTest()
        {
            CT_Workbook worksheet = new CT_Workbook();
            CT_Sheet sheet1 = new CT_Sheet();
            sheet1.name = "Sheet1";
            sheet1.sheetId = 1u;
            sheet1.id = "rId1";
            worksheet.sheets.sheet.Add(sheet1);

            var bks = worksheet.AddNewBookViews();
            var bk = bks.AddNewWorkbookView();
            bk.xWindow = 360;
            bk.xWindowSpecified = true;
            bk.yWindow = 60;
            bk.yWindowSpecified = true;
            bk.windowWidth = 11295;
            bk.windowWidthSpecified = true;
            bk.windowHeight = 5580;
            bk.windowHeightSpecified = true;



            StringWriter stream = new StringWriter();
            WorkbookDocument_Accessor.serializer.Serialize(stream, worksheet, WorkbookDocument_Accessor.namespaces);
            string expected = @"<?xml version=""1.0"" encoding=""utf-16""?>
<workbook xmlns:r=""http://schemas.openxmlformats.org/officeDocument/2006/relationships"" xmlns=""http://schemas.openxmlformats.org/spreadsheetml/2006/main"">
  <bookViews>
    <workbookView xWindow=""360"" yWindow=""60"" windowWidth=""11295"" windowHeight=""5580"" />
  </bookViews>
  <sheets>
    <sheet name=""Sheet1"" sheetId=""1"" r:id=""rId1"" />
  </sheets>
</workbook>";
            Assert.AreEqual(expected, stream.ToString());
        }
Exemplo n.º 13
0
 public CT_Sheet InsertNewSheet(int index)
 {
     CT_Sheet newsheet = new CT_Sheet();
     this.sheetField.Insert(index, newsheet);
     return newsheet;
 }
Exemplo n.º 14
0
 public CT_Sheet AddNewSheet()
 {
     CT_Sheet newsheet = new CT_Sheet();
     this.sheetField.Add(newsheet);
     return newsheet;
 }