Esempio n. 1
0
        public static void Load(this Worksheet self, IImport import)
        {
            self.Cells[0, 0].Value = string.Empty;
            var attributes = import.GetAttributes();

            for (int i = 0; i < attributes.Count; i++)
            {
                self.Cells[0, i + 1].Value = attributes[i];
            }
            var obj = import.GetObjects();

            for (int i = 0; i < obj.Count; i++)
            {
                self.Cells[i + 1, 0].Value = obj[i];
            }
            var context = import.GetContext();

            for (int i = 0; i < context.Count; i++)
            {
                for (int j = 0; j < context[i].Count; j++)
                {
                    self.Cells[i + 1, j + 1].Value = context[i][j];
                }
            }
        }