public void Show()
        {
            ExcelDoc excel = new ExcelDoc();

            CreateHeader(excel);

            CreateBody(excel);

            excel.Show();
        }
Beispiel #2
0
        public void Create()
        {
            var doc = new ExcelDoc();

            try
            {
                var i = 1;

                foreach (MileageReport item in _mileageReportList)
                {
                    if (item.IsFailed)
                    {
                        doc.setValue(i, 1, item.ToString());
                        i++;
                    }
                }

                doc.SetList(2);

                i = 1;

                foreach (MileageReport item in _mileageReportList)
                {
                    if (!item.IsFailed)
                    {
                        doc.setValue(i, 1, item.ToString());
                        i++;
                    }
                }

                doc.Show();
            }

            catch
            {
                doc.Dispose();
            }
        }