Esempio n. 1
0
        public static void Test()
        {
            var imp = new ExcelImporter();
            var rn  = EngineNS.RName.GetRName("GameTable/XlslObject.xls");

            imp.Init(rn.Address);

            var objs = imp.Table2Objects <ExcelHelper.XlslObject>();

            if (objs != null)
            {
            }
        }
Esempio n. 2
0
        public static void Test()
        {
            ExcelImporter.Test();

            var exp = new ExcelExporter();
            var rn  = EngineNS.RName.GetRName("GameTable/XlslObject.xls");

            exp.Init(rn.Address, typeof(XlslObject));

            var lst = new List <XlslObject>();
            var obj = new XlslObject();

            for (int i = 0; i < 10; i++)
            {
                obj   = new XlslObject();
                obj.D = $"D_{i}";
                obj.F.Add(new XlslSubObject());
                obj.F.Add(new XlslSubObject());
                var sobj = new XlslSubObject();
                sobj.A = i;
                obj.F.Add(sobj);
                obj.G.Add($"abc{i}");
                obj.G.Add("efg");
                obj.G.Add("123");
                lst.Add(obj);
            }
            //lst.Add(obj);
            //obj = new XlslObject();
            //obj.A = 10;
            //lst.Add(obj);
            //obj = new XlslObject();
            //obj.D = "AXEXTEXT";
            //obj.F.Add(new XlslSubObject());
            //obj.F.Add(new XlslSubObject());
            //obj.F.Add(new XlslSubObject());
            //obj.G.Add("abc");
            //obj.G.Add("efg");
            //obj.G.Add("123");
            //lst.Add(obj);
            exp.Objects2Table(lst);
            exp.Save(rn.Address);
        }