public MonthlyReport(string financeType, int month, int year, DataTable dt)
 {
     SpreadsheetInfo.SetLicense("FREE-LIMITED-KEY");
     SpreadsheetInfo.FreeLimitReached +=
      (sender, e) => e.FreeLimitReachedAction = FreeLimitReachedAction.ContinueAsTrial;
     output = new ExcelOutput
         ("Report_" + financeType + "_" + year + "_" + month + ".xls");
     this.workbook = new ExcelFile();
     this.worksheet = workbook.Worksheets.Add("Report");
     this.month = month;
     this.year = year;
     this.dt = dt;
     this.financeType = financeType;
     row = 0;
     worksheet.Columns[3].Width = 35 * 256;
     worksheet.Columns[1].Width = 15 * 256;
     worksheet.Columns[2].Width = 12 * 256;
     worksheet.Columns[1].Style.HorizontalAlignment = HorizontalAlignmentStyle.Right;
 }
Ejemplo n.º 2
0
 public DateReport(string financeType, DateTime date, DataTable dt)
 {
     SpreadsheetInfo.SetLicense("FREE-LIMITED-KEY");
     SpreadsheetInfo.FreeLimitReached +=
      (sender, e) => e.FreeLimitReachedAction = FreeLimitReachedAction.ContinueAsTrial;
     output = new ExcelOutput
         ("Report_" + financeType + "_" +
         date.ToString("yyyyMMdd") + "_" + ".xls");
     this.workbook = new ExcelFile();
     this.worksheet = workbook.Worksheets.Add("Report");
     this.date = date;
     this.dt = dt;
     this.financeType = financeType;
     row = 0;
     worksheet.Columns[3].Width = 35 * 256;
     worksheet.Columns[1].Width = 15 * 256;
     worksheet.Columns[2].Width = 12 * 256;
     worksheet.Columns[1].Style.HorizontalAlignment = HorizontalAlignmentStyle.Right;
 }