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

            CreateHeader(excel);

            CreateBody(excel);

            excel.Show();
        }
示例#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();
            }
        }