Example #1
0
        static void Main(string[] args)
        {
            List<teste> list = new List<teste>();
            for(var i = 0; i < 200; i++)
            {
                list.Add(new teste() { Name = "aaa" + i.ToString(), Ano = i });
            }

            Configuration config = new Configuration();
            config.FileName = "teste";
            config.FilePath = @"D:\testes";
            config.NameSheet = "teste";
            IExcelAction action = new ExcelAction();
            Style st = new Style();
            var a = action.GenerateExcel(config, st, list);
            Console.WriteLine("Arquivo gerado em " + a);
            Console.ReadLine();
        }
        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    this.configuration = null;
                    this.style = null;
                }

                // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below.
                // TODO: set large fields to null.

                disposedValue = true;
            }
        }
 public String GenerateExcel(Configuration configuration, Style style, IEnumerable<Object> listObject)
 {
     Configuration = configuration;
     Style = style;
     Objects = listObject;
     return this.Execute();
 }