//create a new workbook var workbook = new GrapeCity.Documents.Excel.Workbook(); //Load template file from resource var templateFile = this.GetResourceStream("xlsx\\Template_EmployeeAbsenceSchedule.xlsx"); workbook.Open(templateFile); #region Init Data var datasource = new DataTable(); datasource.Columns.Add(new DataColumn("Month", typeof(string))); datasource.Columns.Add(new DataColumn("Day", typeof(Int32))); datasource.Columns.Add(new DataColumn("Name", typeof(string))); datasource.Columns.Add(new DataColumn("AbsenceType", typeof(string))); datasource.Rows.Add("January", 1, "Mark Walter", null); datasource.Rows.Add("January", 2, "Mark Walter", null); datasource.Rows.Add("January", 3, "Mark Walter", "V"); datasource.Rows.Add("January", 4, "Mark Walter", "V"); datasource.Rows.Add("January", 5, "Mark Walter", "V"); datasource.Rows.Add("January", 6, "Mark Walter", "V"); datasource.Rows.Add("January", 7, "Mark Walter", null); datasource.Rows.Add("January", 8, "Mark Walter", null); datasource.Rows.Add("January", 9, "Mark Walter", null); datasource.Rows.Add("January", 10, "Mark Walter", null); datasource.Rows.Add("January", 11, "Mark Walter", null); datasource.Rows.Add("January", 12, "Mark Walter", null); datasource.Rows.Add("January", 13, "Mark Walter", "V"); datasource.Rows.Add("January", 14, "Mark Walter", null); datasource.Rows.Add("January", 15, "Mark Walter", null); datasource.Rows.Add("January", 16, "Mark Walter", null); datasource.Rows.Add("January", 17, "Mark Walter", null); datasource.Rows.Add("January", 18, "Mark Walter", null); datasource.Rows.Add("January", 19, "Mark Walter", null); datasource.Rows.Add("January", 20, "Mark Walter", null); datasource.Rows.Add("January", 21, "Mark Walter", null); datasource.Rows.Add("January", 22, "Mark Walter", null); datasource.Rows.Add("January", 23, "Mark Walter", null); datasource.Rows.Add("January", 24, "Mark Walter", null); datasource.Rows.Add("January", 25, "Mark Walter", null); datasource.Rows.Add("January", 26, "Mark Walter", null); datasource.Rows.Add("January", 27, "Mark Walter", null); datasource.Rows.Add("January", 28, "Mark Walter", null); datasource.Rows.Add("January", 29, "Mark Walter", null); datasource.Rows.Add("January", 30, "Mark Walter", null); datasource.Rows.Add("January", 31, "Mark Walter", null); datasource.Rows.Add("January", 1, "James Collins", null); datasource.Rows.Add("January", 2, "James Collins", null); datasource.Rows.Add("January", 3, "James Collins", null); datasource.Rows.Add("January", 4, "James Collins", null); datasource.Rows.Add("January", 5, "James Collins", "S"); datasource.Rows.Add("January", 6, "James Collins", "S"); datasource.Rows.Add("January", 7, "James Collins", null); datasource.Rows.Add("January", 8, "James Collins", null); datasource.Rows.Add("January", 9, "James Collins", null); datasource.Rows.Add("January", 10, "James Collins", null); datasource.Rows.Add("January", 11, "James Collins", "P"); datasource.Rows.Add("January", 12, "James Collins", null); datasource.Rows.Add("January", 13, "James Collins", null); datasource.Rows.Add("January", 14, "James Collins", null); datasource.Rows.Add("January", 15, "James Collins", null); datasource.Rows.Add("January", 16, "James Collins", null); datasource.Rows.Add("January", 17, "James Collins", null); datasource.Rows.Add("January", 18, "James Collins", null); datasource.Rows.Add("January", 19, "James Collins", null); datasource.Rows.Add("January", 20, "James Collins", "S"); datasource.Rows.Add("January", 21, "James Collins", null); datasource.Rows.Add("January", 22, "James Collins", null); datasource.Rows.Add("January", 23, "James Collins", null); datasource.Rows.Add("January", 24, "James Collins", null); datasource.Rows.Add("January", 25, "James Collins", "V"); datasource.Rows.Add("January", 26, "James Collins", "V"); datasource.Rows.Add("January", 27, "James Collins", "V"); datasource.Rows.Add("January", 28, "James Collins", null); datasource.Rows.Add("January", 29, "James Collins", null); datasource.Rows.Add("January", 30, "James Collins", null); datasource.Rows.Add("January", 31, "James Collins", null); datasource.Rows.Add("January", 1, "Andrew Fuller", null); datasource.Rows.Add("January", 2, "Andrew Fuller", null); datasource.Rows.Add("January", 3, "Andrew Fuller", "P"); datasource.Rows.Add("January", 4, "Andrew Fuller", null); datasource.Rows.Add("January", 5, "Andrew Fuller", null); datasource.Rows.Add("January", 6, "Andrew Fuller", null); datasource.Rows.Add("January", 7, "Andrew Fuller", null); datasource.Rows.Add("January", 8, "Andrew Fuller", null); datasource.Rows.Add("January", 9, "Andrew Fuller", null); datasource.Rows.Add("January", 10, "Andrew Fuller", null); datasource.Rows.Add("January", 11, "Andrew Fuller", null); datasource.Rows.Add("January", 12, "Andrew Fuller", null); datasource.Rows.Add("January", 13, "Andrew Fuller", null); datasource.Rows.Add("January", 14, "Andrew Fuller", "S"); datasource.Rows.Add("January", 15, "Andrew Fuller", null); datasource.Rows.Add("January", 16, "Andrew Fuller", null); datasource.Rows.Add("January", 17, "Andrew Fuller", null); datasource.Rows.Add("January", 18, "Andrew Fuller", null); datasource.Rows.Add("January", 19, "Andrew Fuller", null); datasource.Rows.Add("January", 20, "Andrew Fuller", null); datasource.Rows.Add("January", 21, "Andrew Fuller", null); datasource.Rows.Add("January", 22, "Andrew Fuller", null); datasource.Rows.Add("January", 23, "Andrew Fuller", null); datasource.Rows.Add("January", 24, "Andrew Fuller", null); datasource.Rows.Add("January", 25, "Andrew Fuller", null); datasource.Rows.Add("January", 26, "Andrew Fuller", null); datasource.Rows.Add("January", 27, "Andrew Fuller", null); datasource.Rows.Add("January", 28, "Andrew Fuller", null); datasource.Rows.Add("January", 29, "Andrew Fuller", "S"); datasource.Rows.Add("January", 30, "Andrew Fuller", null); datasource.Rows.Add("January", 31, "Andrew Fuller", null); datasource.Rows.Add("January", 1, "Kiara Davidson", null); datasource.Rows.Add("January", 2, "Kiara Davidson", null); datasource.Rows.Add("January", 3, "Kiara Davidson", null); datasource.Rows.Add("January", 4, "Kiara Davidson", null); datasource.Rows.Add("January", 5, "Kiara Davidson", null); datasource.Rows.Add("January", 6, "Kiara Davidson", null); datasource.Rows.Add("January", 7, "Kiara Davidson", "P"); datasource.Rows.Add("January", 8, "Kiara Davidson", null); datasource.Rows.Add("January", 9, "Kiara Davidson", null); datasource.Rows.Add("January", 10, "Kiara Davidson", null); datasource.Rows.Add("January", 11, "Kiara Davidson", null); datasource.Rows.Add("January", 12, "Kiara Davidson", null); datasource.Rows.Add("January", 13, "Kiara Davidson", null); datasource.Rows.Add("January", 14, "Kiara Davidson", null); datasource.Rows.Add("January", 15, "Kiara Davidson", null); datasource.Rows.Add("January", 16, "Kiara Davidson", null); datasource.Rows.Add("January", 17, "Kiara Davidson", null); datasource.Rows.Add("January", 18, "Kiara Davidson", null); datasource.Rows.Add("January", 19, "Kiara Davidson", "V"); datasource.Rows.Add("January", 20, "Kiara Davidson", "V"); datasource.Rows.Add("January", 21, "Kiara Davidson", "V"); datasource.Rows.Add("January", 22, "Kiara Davidson", null); datasource.Rows.Add("January", 23, "Kiara Davidson", null); datasource.Rows.Add("January", 24, "Kiara Davidson", null); datasource.Rows.Add("January", 25, "Kiara Davidson", null); datasource.Rows.Add("January", 26, "Kiara Davidson", null); datasource.Rows.Add("January", 27, "Kiara Davidson", null); datasource.Rows.Add("January", 28, "Kiara Davidson", null); datasource.Rows.Add("January", 29, "Kiara Davidson", null); datasource.Rows.Add("January", 30, "Kiara Davidson", null); datasource.Rows.Add("January", 31, "Kiara Davidson", null); datasource.Rows.Add("January", 1, "Edward Williams", null); datasource.Rows.Add("January", 2, "Edward Williams", null); datasource.Rows.Add("January", 3, "Edward Williams", null); datasource.Rows.Add("January", 4, "Edward Williams", "S"); datasource.Rows.Add("January", 5, "Edward Williams", "V"); datasource.Rows.Add("January", 6, "Edward Williams", "V"); datasource.Rows.Add("January", 7, "Edward Williams", null); datasource.Rows.Add("January", 8, "Edward Williams", null); datasource.Rows.Add("January", 9, "Edward Williams", null); datasource.Rows.Add("January", 10, "Edward Williams", null); datasource.Rows.Add("January", 11, "Edward Williams", null); datasource.Rows.Add("January", 12, "Edward Williams", null); datasource.Rows.Add("January", 13, "Edward Williams", null); datasource.Rows.Add("January", 14, "Edward Williams", null); datasource.Rows.Add("January", 15, "Edward Williams", null); datasource.Rows.Add("January", 16, "Edward Williams", null); datasource.Rows.Add("January", 17, "Edward Williams", "S"); datasource.Rows.Add("January", 18, "Edward Williams", null); datasource.Rows.Add("January", 19, "Edward Williams", null); datasource.Rows.Add("January", 20, "Edward Williams", null); datasource.Rows.Add("January", 21, "Edward Williams", null); datasource.Rows.Add("January", 22, "Edward Williams", null); datasource.Rows.Add("January", 23, "Edward Williams", null); datasource.Rows.Add("January", 24, "Edward Williams", "S"); datasource.Rows.Add("January", 25, "Edward Williams", null); datasource.Rows.Add("January", 26, "Edward Williams", null); datasource.Rows.Add("January", 27, "Edward Williams", null); datasource.Rows.Add("January", 28, "Edward Williams", null); datasource.Rows.Add("January", 29, "Edward Williams", null); datasource.Rows.Add("January", 30, "Edward Williams", null); datasource.Rows.Add("January", 31, "Edward Williams", "V"); datasource.Rows.Add("February", 1, "Mark Walter", null); datasource.Rows.Add("February", 2, "Mark Walter", null); datasource.Rows.Add("February", 3, "Mark Walter", "V"); datasource.Rows.Add("February", 4, "Mark Walter", "V"); datasource.Rows.Add("February", 5, "Mark Walter", null); datasource.Rows.Add("February", 6, "Mark Walter", null); datasource.Rows.Add("February", 7, "Mark Walter", null); datasource.Rows.Add("February", 8, "Mark Walter", null); datasource.Rows.Add("February", 9, "Mark Walter", null); datasource.Rows.Add("February", 10, "Mark Walter", null); datasource.Rows.Add("February", 11, "Mark Walter", "P"); datasource.Rows.Add("February", 12, "Mark Walter", null); datasource.Rows.Add("February", 13, "Mark Walter", "V"); datasource.Rows.Add("February", 14, "Mark Walter", null); datasource.Rows.Add("February", 15, "Mark Walter", null); datasource.Rows.Add("February", 16, "Mark Walter", null); datasource.Rows.Add("February", 17, "Mark Walter", null); datasource.Rows.Add("February", 18, "Mark Walter", null); datasource.Rows.Add("February", 19, "Mark Walter", null); datasource.Rows.Add("February", 20, "Mark Walter", null); datasource.Rows.Add("February", 21, "Mark Walter", null); datasource.Rows.Add("February", 22, "Mark Walter", "S"); datasource.Rows.Add("February", 23, "Mark Walter", null); datasource.Rows.Add("February", 24, "Mark Walter", null); datasource.Rows.Add("February", 25, "Mark Walter", null); datasource.Rows.Add("February", 26, "Mark Walter", null); datasource.Rows.Add("February", 27, "Mark Walter", null); datasource.Rows.Add("February", 28, "Mark Walter", null); datasource.Rows.Add("February", 1, "James Collins", null); datasource.Rows.Add("February", 2, "James Collins", null); datasource.Rows.Add("February", 3, "James Collins", "S"); datasource.Rows.Add("February", 4, "James Collins", null); datasource.Rows.Add("February", 5, "James Collins", null); datasource.Rows.Add("February", 6, "James Collins", null); datasource.Rows.Add("February", 7, "James Collins", null); datasource.Rows.Add("February", 8, "James Collins", null); datasource.Rows.Add("February", 9, "James Collins", null); datasource.Rows.Add("February", 10, "James Collins", null); datasource.Rows.Add("February", 11, "James Collins", "V"); datasource.Rows.Add("February", 12, "James Collins", null); datasource.Rows.Add("February", 13, "James Collins", null); datasource.Rows.Add("February", 14, "James Collins", null); datasource.Rows.Add("February", 15, "James Collins", null); datasource.Rows.Add("February", 16, "James Collins", null); datasource.Rows.Add("February", 17, "James Collins", null); datasource.Rows.Add("February", 18, "James Collins", null); datasource.Rows.Add("February", 19, "James Collins", null); datasource.Rows.Add("February", 20, "James Collins", "S"); datasource.Rows.Add("February", 21, "James Collins", null); datasource.Rows.Add("February", 22, "James Collins", null); datasource.Rows.Add("February", 23, "James Collins", null); datasource.Rows.Add("February", 24, "James Collins", null); datasource.Rows.Add("February", 25, "James Collins", "P"); datasource.Rows.Add("February", 26, "James Collins", null); datasource.Rows.Add("February", 27, "James Collins", null); datasource.Rows.Add("February", 28, "James Collins", null); datasource.Rows.Add("February", 1, "Andrew Fuller", null); datasource.Rows.Add("February", 2, "Andrew Fuller", null); datasource.Rows.Add("February", 3, "Andrew Fuller", "P"); datasource.Rows.Add("February", 4, "Andrew Fuller", null); datasource.Rows.Add("February", 5, "Andrew Fuller", null); datasource.Rows.Add("February", 6, "Andrew Fuller", null); datasource.Rows.Add("February", 7, "Andrew Fuller", null); datasource.Rows.Add("February", 8, "Andrew Fuller", "V"); datasource.Rows.Add("February", 9, "Andrew Fuller", null); datasource.Rows.Add("February", 10, "Andrew Fuller", null); datasource.Rows.Add("February", 11, "Andrew Fuller", null); datasource.Rows.Add("February", 12, "Andrew Fuller", null); datasource.Rows.Add("February", 13, "Andrew Fuller", null); datasource.Rows.Add("February", 14, "Andrew Fuller", "S"); datasource.Rows.Add("February", 15, "Andrew Fuller", null); datasource.Rows.Add("February", 16, "Andrew Fuller", null); datasource.Rows.Add("February", 17, "Andrew Fuller", null); datasource.Rows.Add("February", 18, "Andrew Fuller", null); datasource.Rows.Add("February", 19, "Andrew Fuller", null); datasource.Rows.Add("February", 20, "Andrew Fuller", null); datasource.Rows.Add("February", 21, "Andrew Fuller", null); datasource.Rows.Add("February", 22, "Andrew Fuller", "V"); datasource.Rows.Add("February", 23, "Andrew Fuller", "V"); datasource.Rows.Add("February", 24, "Andrew Fuller", "V"); datasource.Rows.Add("February", 25, "Andrew Fuller", null); datasource.Rows.Add("February", 26, "Andrew Fuller", null); datasource.Rows.Add("February", 27, "Andrew Fuller", null); datasource.Rows.Add("February", 28, "Andrew Fuller", null); datasource.Rows.Add("February", 1, "Kiara Davidson", null); datasource.Rows.Add("February", 2, "Kiara Davidson", null); datasource.Rows.Add("February", 3, "Kiara Davidson", null); datasource.Rows.Add("February", 4, "Kiara Davidson", null); datasource.Rows.Add("February", 5, "Kiara Davidson", null); datasource.Rows.Add("February", 6, "Kiara Davidson", null); datasource.Rows.Add("February", 7, "Kiara Davidson", "P"); datasource.Rows.Add("February", 8, "Kiara Davidson", null); datasource.Rows.Add("February", 9, "Kiara Davidson", null); datasource.Rows.Add("February", 10, "Kiara Davidson", null); datasource.Rows.Add("February", 11, "Kiara Davidson", "S"); datasource.Rows.Add("February", 12, "Kiara Davidson", null); datasource.Rows.Add("February", 13, "Kiara Davidson", null); datasource.Rows.Add("February", 14, "Kiara Davidson", null); datasource.Rows.Add("February", 15, "Kiara Davidson", null); datasource.Rows.Add("February", 16, "Kiara Davidson", null); datasource.Rows.Add("February", 17, "Kiara Davidson", null); datasource.Rows.Add("February", 18, "Kiara Davidson", null); datasource.Rows.Add("February", 19, "Kiara Davidson", "V"); datasource.Rows.Add("February", 20, "Kiara Davidson", "V"); datasource.Rows.Add("February", 21, "Kiara Davidson", "V"); datasource.Rows.Add("February", 22, "Kiara Davidson", null); datasource.Rows.Add("February", 23, "Kiara Davidson", null); datasource.Rows.Add("February", 24, "Kiara Davidson", null); datasource.Rows.Add("February", 25, "Kiara Davidson", null); datasource.Rows.Add("February", 26, "Kiara Davidson", null); datasource.Rows.Add("February", 27, "Kiara Davidson", null); datasource.Rows.Add("February", 28, "Kiara Davidson", null); datasource.Rows.Add("February", 1, "Edward Williams", null); datasource.Rows.Add("February", 2, "Edward Williams", null); datasource.Rows.Add("February", 3, "Edward Williams", null); datasource.Rows.Add("February", 4, "Edward Williams", "S"); datasource.Rows.Add("February", 5, "Edward Williams", null); datasource.Rows.Add("February", 6, "Edward Williams", null); datasource.Rows.Add("February", 7, "Edward Williams", null); datasource.Rows.Add("February", 8, "Edward Williams", null); datasource.Rows.Add("February", 9, "Edward Williams", null); datasource.Rows.Add("February", 10, "Edward Williams", null); datasource.Rows.Add("February", 11, "Edward Williams", null); datasource.Rows.Add("February", 12, "Edward Williams", null); datasource.Rows.Add("February", 13, "Edward Williams", null); datasource.Rows.Add("February", 14, "Edward Williams", null); datasource.Rows.Add("February", 15, "Edward Williams", null); datasource.Rows.Add("February", 16, "Edward Williams", null); datasource.Rows.Add("February", 17, "Edward Williams", "S"); datasource.Rows.Add("February", 18, "Edward Williams", null); datasource.Rows.Add("February", 19, "Edward Williams", null); datasource.Rows.Add("February", 20, "Edward Williams", null); datasource.Rows.Add("February", 21, "Edward Williams", null); datasource.Rows.Add("February", 22, "Edward Williams", null); datasource.Rows.Add("February", 23, "Edward Williams", null); datasource.Rows.Add("February", 24, "Edward Williams", "P"); datasource.Rows.Add("February", 25, "Edward Williams", null); datasource.Rows.Add("February", 26, "Edward Williams", null); datasource.Rows.Add("February", 27, "Edward Williams", "V"); datasource.Rows.Add("February", 28, "Edward Williams", "V"); #endregion //Init template global settings workbook.Names.Add("TemplateOptions.KeepLineSize", "true"); //Add data source workbook.AddDataSource("ds", datasource); //Invoke to process the template workbook.ProcessTemplate(); // Save to an excel file workbook.Save("EmployeeAbsenceSchedule.xlsx");
' Create a new Workbook Dim workbook As New Workbook 'Load template file from resource Dim templateFile = GetResourceStream("xlsx\Template_EmployeeAbsenceSchedule.xlsx") workbook.Open(templateFile) #Region "Init Data" Dim datasource As New DataTable With datasource.Columns .Add(New DataColumn("Month", GetType(String))) .Add(New DataColumn("Day", GetType(Integer))) .Add(New DataColumn("Name", GetType(String))) .Add(New DataColumn("AbsenceType", GetType(String))) End With With datasource.Rows .Add("January", 1, "Mark Walter", Nothing) .Add("January", 2, "Mark Walter", Nothing) .Add("January", 3, "Mark Walter", "V") .Add("January", 4, "Mark Walter", "V") .Add("January", 5, "Mark Walter", "V") .Add("January", 6, "Mark Walter", "V") .Add("January", 7, "Mark Walter", Nothing) .Add("January", 8, "Mark Walter", Nothing) .Add("January", 9, "Mark Walter", Nothing) .Add("January", 10, "Mark Walter", Nothing) .Add("January", 11, "Mark Walter", Nothing) .Add("January", 12, "Mark Walter", Nothing) .Add("January", 13, "Mark Walter", "V") .Add("January", 14, "Mark Walter", Nothing) .Add("January", 15, "Mark Walter", Nothing) .Add("January", 16, "Mark Walter", Nothing) .Add("January", 17, "Mark Walter", Nothing) .Add("January", 18, "Mark Walter", Nothing) .Add("January", 19, "Mark Walter", Nothing) .Add("January", 20, "Mark Walter", Nothing) .Add("January", 21, "Mark Walter", Nothing) .Add("January", 22, "Mark Walter", Nothing) .Add("January", 23, "Mark Walter", Nothing) .Add("January", 24, "Mark Walter", Nothing) .Add("January", 25, "Mark Walter", Nothing) .Add("January", 26, "Mark Walter", Nothing) .Add("January", 27, "Mark Walter", Nothing) .Add("January", 28, "Mark Walter", Nothing) .Add("January", 29, "Mark Walter", Nothing) .Add("January", 30, "Mark Walter", Nothing) .Add("January", 31, "Mark Walter", Nothing) .Add("January", 1, "James Collins", Nothing) .Add("January", 2, "James Collins", Nothing) .Add("January", 3, "James Collins", Nothing) .Add("January", 4, "James Collins", Nothing) .Add("January", 5, "James Collins", "S") .Add("January", 6, "James Collins", "S") .Add("January", 7, "James Collins", Nothing) .Add("January", 8, "James Collins", Nothing) .Add("January", 9, "James Collins", Nothing) .Add("January", 10, "James Collins", Nothing) .Add("January", 11, "James Collins", "P") .Add("January", 12, "James Collins", Nothing) .Add("January", 13, "James Collins", Nothing) .Add("January", 14, "James Collins", Nothing) .Add("January", 15, "James Collins", Nothing) .Add("January", 16, "James Collins", Nothing) .Add("January", 17, "James Collins", Nothing) .Add("January", 18, "James Collins", Nothing) .Add("January", 19, "James Collins", Nothing) .Add("January", 20, "James Collins", "S") .Add("January", 21, "James Collins", Nothing) .Add("January", 22, "James Collins", Nothing) .Add("January", 23, "James Collins", Nothing) .Add("January", 24, "James Collins", Nothing) .Add("January", 25, "James Collins", "V") .Add("January", 26, "James Collins", "V") .Add("January", 27, "James Collins", "V") .Add("January", 28, "James Collins", Nothing) .Add("January", 29, "James Collins", Nothing) .Add("January", 30, "James Collins", Nothing) .Add("January", 31, "James Collins", Nothing) .Add("January", 1, "Andrew Fuller", Nothing) .Add("January", 2, "Andrew Fuller", Nothing) .Add("January", 3, "Andrew Fuller", "P") .Add("January", 4, "Andrew Fuller", Nothing) .Add("January", 5, "Andrew Fuller", Nothing) .Add("January", 6, "Andrew Fuller", Nothing) .Add("January", 7, "Andrew Fuller", Nothing) .Add("January", 8, "Andrew Fuller", Nothing) .Add("January", 9, "Andrew Fuller", Nothing) .Add("January", 10, "Andrew Fuller", Nothing) .Add("January", 11, "Andrew Fuller", Nothing) .Add("January", 12, "Andrew Fuller", Nothing) .Add("January", 13, "Andrew Fuller", Nothing) .Add("January", 14, "Andrew Fuller", "S") .Add("January", 15, "Andrew Fuller", Nothing) .Add("January", 16, "Andrew Fuller", Nothing) .Add("January", 17, "Andrew Fuller", Nothing) .Add("January", 18, "Andrew Fuller", Nothing) .Add("January", 19, "Andrew Fuller", Nothing) .Add("January", 20, "Andrew Fuller", Nothing) .Add("January", 21, "Andrew Fuller", Nothing) .Add("January", 22, "Andrew Fuller", Nothing) .Add("January", 23, "Andrew Fuller", Nothing) .Add("January", 24, "Andrew Fuller", Nothing) .Add("January", 25, "Andrew Fuller", Nothing) .Add("January", 26, "Andrew Fuller", Nothing) .Add("January", 27, "Andrew Fuller", Nothing) .Add("January", 28, "Andrew Fuller", Nothing) .Add("January", 29, "Andrew Fuller", "S") .Add("January", 30, "Andrew Fuller", Nothing) .Add("January", 31, "Andrew Fuller", Nothing) .Add("January", 1, "Kiara Davidson", Nothing) .Add("January", 2, "Kiara Davidson", Nothing) .Add("January", 3, "Kiara Davidson", Nothing) .Add("January", 4, "Kiara Davidson", Nothing) .Add("January", 5, "Kiara Davidson", Nothing) .Add("January", 6, "Kiara Davidson", Nothing) .Add("January", 7, "Kiara Davidson", "P") .Add("January", 8, "Kiara Davidson", Nothing) .Add("January", 9, "Kiara Davidson", Nothing) .Add("January", 10, "Kiara Davidson", Nothing) .Add("January", 11, "Kiara Davidson", Nothing) .Add("January", 12, "Kiara Davidson", Nothing) .Add("January", 13, "Kiara Davidson", Nothing) .Add("January", 14, "Kiara Davidson", Nothing) .Add("January", 15, "Kiara Davidson", Nothing) .Add("January", 16, "Kiara Davidson", Nothing) .Add("January", 17, "Kiara Davidson", Nothing) .Add("January", 18, "Kiara Davidson", Nothing) .Add("January", 19, "Kiara Davidson", "V") .Add("January", 20, "Kiara Davidson", "V") .Add("January", 21, "Kiara Davidson", "V") .Add("January", 22, "Kiara Davidson", Nothing) .Add("January", 23, "Kiara Davidson", Nothing) .Add("January", 24, "Kiara Davidson", Nothing) .Add("January", 25, "Kiara Davidson", Nothing) .Add("January", 26, "Kiara Davidson", Nothing) .Add("January", 27, "Kiara Davidson", Nothing) .Add("January", 28, "Kiara Davidson", Nothing) .Add("January", 29, "Kiara Davidson", Nothing) .Add("January", 30, "Kiara Davidson", Nothing) .Add("January", 31, "Kiara Davidson", Nothing) .Add("January", 1, "Edward Williams", Nothing) .Add("January", 2, "Edward Williams", Nothing) .Add("January", 3, "Edward Williams", Nothing) .Add("January", 4, "Edward Williams", "S") .Add("January", 5, "Edward Williams", "V") .Add("January", 6, "Edward Williams", "V") .Add("January", 7, "Edward Williams", Nothing) .Add("January", 8, "Edward Williams", Nothing) .Add("January", 9, "Edward Williams", Nothing) .Add("January", 10, "Edward Williams", Nothing) .Add("January", 11, "Edward Williams", Nothing) .Add("January", 12, "Edward Williams", Nothing) .Add("January", 13, "Edward Williams", Nothing) .Add("January", 14, "Edward Williams", Nothing) .Add("January", 15, "Edward Williams", Nothing) .Add("January", 16, "Edward Williams", Nothing) .Add("January", 17, "Edward Williams", "S") .Add("January", 18, "Edward Williams", Nothing) .Add("January", 19, "Edward Williams", Nothing) .Add("January", 20, "Edward Williams", Nothing) .Add("January", 21, "Edward Williams", Nothing) .Add("January", 22, "Edward Williams", Nothing) .Add("January", 23, "Edward Williams", Nothing) .Add("January", 24, "Edward Williams", "S") .Add("January", 25, "Edward Williams", Nothing) .Add("January", 26, "Edward Williams", Nothing) .Add("January", 27, "Edward Williams", Nothing) .Add("January", 28, "Edward Williams", Nothing) .Add("January", 29, "Edward Williams", Nothing) .Add("January", 30, "Edward Williams", Nothing) .Add("January", 31, "Edward Williams", "V") .Add("February", 1, "Mark Walter", Nothing) .Add("February", 2, "Mark Walter", Nothing) .Add("February", 3, "Mark Walter", "V") .Add("February", 4, "Mark Walter", "V") .Add("February", 5, "Mark Walter", Nothing) .Add("February", 6, "Mark Walter", Nothing) .Add("February", 7, "Mark Walter", Nothing) .Add("February", 8, "Mark Walter", Nothing) .Add("February", 9, "Mark Walter", Nothing) .Add("February", 10, "Mark Walter", Nothing) .Add("February", 11, "Mark Walter", "P") .Add("February", 12, "Mark Walter", Nothing) .Add("February", 13, "Mark Walter", "V") .Add("February", 14, "Mark Walter", Nothing) .Add("February", 15, "Mark Walter", Nothing) .Add("February", 16, "Mark Walter", Nothing) .Add("February", 17, "Mark Walter", Nothing) .Add("February", 18, "Mark Walter", Nothing) .Add("February", 19, "Mark Walter", Nothing) .Add("February", 20, "Mark Walter", Nothing) .Add("February", 21, "Mark Walter", Nothing) .Add("February", 22, "Mark Walter", "S") .Add("February", 23, "Mark Walter", Nothing) .Add("February", 24, "Mark Walter", Nothing) .Add("February", 25, "Mark Walter", Nothing) .Add("February", 26, "Mark Walter", Nothing) .Add("February", 27, "Mark Walter", Nothing) .Add("February", 28, "Mark Walter", Nothing) .Add("February", 1, "James Collins", Nothing) .Add("February", 2, "James Collins", Nothing) .Add("February", 3, "James Collins", "S") .Add("February", 4, "James Collins", Nothing) .Add("February", 5, "James Collins", Nothing) .Add("February", 6, "James Collins", Nothing) .Add("February", 7, "James Collins", Nothing) .Add("February", 8, "James Collins", Nothing) .Add("February", 9, "James Collins", Nothing) .Add("February", 10, "James Collins", Nothing) .Add("February", 11, "James Collins", "V") .Add("February", 12, "James Collins", Nothing) .Add("February", 13, "James Collins", Nothing) .Add("February", 14, "James Collins", Nothing) .Add("February", 15, "James Collins", Nothing) .Add("February", 16, "James Collins", Nothing) .Add("February", 17, "James Collins", Nothing) .Add("February", 18, "James Collins", Nothing) .Add("February", 19, "James Collins", Nothing) .Add("February", 20, "James Collins", "S") .Add("February", 21, "James Collins", Nothing) .Add("February", 22, "James Collins", Nothing) .Add("February", 23, "James Collins", Nothing) .Add("February", 24, "James Collins", Nothing) .Add("February", 25, "James Collins", "P") .Add("February", 26, "James Collins", Nothing) .Add("February", 27, "James Collins", Nothing) .Add("February", 28, "James Collins", Nothing) .Add("February", 1, "Andrew Fuller", Nothing) .Add("February", 2, "Andrew Fuller", Nothing) .Add("February", 3, "Andrew Fuller", "P") .Add("February", 4, "Andrew Fuller", Nothing) .Add("February", 5, "Andrew Fuller", Nothing) .Add("February", 6, "Andrew Fuller", Nothing) .Add("February", 7, "Andrew Fuller", Nothing) .Add("February", 8, "Andrew Fuller", "V") .Add("February", 9, "Andrew Fuller", Nothing) .Add("February", 10, "Andrew Fuller", Nothing) .Add("February", 11, "Andrew Fuller", Nothing) .Add("February", 12, "Andrew Fuller", Nothing) .Add("February", 13, "Andrew Fuller", Nothing) .Add("February", 14, "Andrew Fuller", "S") .Add("February", 15, "Andrew Fuller", Nothing) .Add("February", 16, "Andrew Fuller", Nothing) .Add("February", 17, "Andrew Fuller", Nothing) .Add("February", 18, "Andrew Fuller", Nothing) .Add("February", 19, "Andrew Fuller", Nothing) .Add("February", 20, "Andrew Fuller", Nothing) .Add("February", 21, "Andrew Fuller", Nothing) .Add("February", 22, "Andrew Fuller", "V") .Add("February", 23, "Andrew Fuller", "V") .Add("February", 24, "Andrew Fuller", "V") .Add("February", 25, "Andrew Fuller", Nothing) .Add("February", 26, "Andrew Fuller", Nothing) .Add("February", 27, "Andrew Fuller", Nothing) .Add("February", 28, "Andrew Fuller", Nothing) .Add("February", 1, "Kiara Davidson", Nothing) .Add("February", 2, "Kiara Davidson", Nothing) .Add("February", 3, "Kiara Davidson", Nothing) .Add("February", 4, "Kiara Davidson", Nothing) .Add("February", 5, "Kiara Davidson", Nothing) .Add("February", 6, "Kiara Davidson", Nothing) .Add("February", 7, "Kiara Davidson", "P") .Add("February", 8, "Kiara Davidson", Nothing) .Add("February", 9, "Kiara Davidson", Nothing) .Add("February", 10, "Kiara Davidson", Nothing) .Add("February", 11, "Kiara Davidson", "S") .Add("February", 12, "Kiara Davidson", Nothing) .Add("February", 13, "Kiara Davidson", Nothing) .Add("February", 14, "Kiara Davidson", Nothing) .Add("February", 15, "Kiara Davidson", Nothing) .Add("February", 16, "Kiara Davidson", Nothing) .Add("February", 17, "Kiara Davidson", Nothing) .Add("February", 18, "Kiara Davidson", Nothing) .Add("February", 19, "Kiara Davidson", "V") .Add("February", 20, "Kiara Davidson", "V") .Add("February", 21, "Kiara Davidson", "V") .Add("February", 22, "Kiara Davidson", Nothing) .Add("February", 23, "Kiara Davidson", Nothing) .Add("February", 24, "Kiara Davidson", Nothing) .Add("February", 25, "Kiara Davidson", Nothing) .Add("February", 26, "Kiara Davidson", Nothing) .Add("February", 27, "Kiara Davidson", Nothing) .Add("February", 28, "Kiara Davidson", Nothing) .Add("February", 1, "Edward Williams", Nothing) .Add("February", 2, "Edward Williams", Nothing) .Add("February", 3, "Edward Williams", Nothing) .Add("February", 4, "Edward Williams", "S") .Add("February", 5, "Edward Williams", Nothing) .Add("February", 6, "Edward Williams", Nothing) .Add("February", 7, "Edward Williams", Nothing) .Add("February", 8, "Edward Williams", Nothing) .Add("February", 9, "Edward Williams", Nothing) .Add("February", 10, "Edward Williams", Nothing) .Add("February", 11, "Edward Williams", Nothing) .Add("February", 12, "Edward Williams", Nothing) .Add("February", 13, "Edward Williams", Nothing) .Add("February", 14, "Edward Williams", Nothing) .Add("February", 15, "Edward Williams", Nothing) .Add("February", 16, "Edward Williams", Nothing) .Add("February", 17, "Edward Williams", "S") .Add("February", 18, "Edward Williams", Nothing) .Add("February", 19, "Edward Williams", Nothing) .Add("February", 20, "Edward Williams", Nothing) .Add("February", 21, "Edward Williams", Nothing) .Add("February", 22, "Edward Williams", Nothing) .Add("February", 23, "Edward Williams", Nothing) .Add("February", 24, "Edward Williams", "P") .Add("February", 25, "Edward Williams", Nothing) .Add("February", 26, "Edward Williams", Nothing) .Add("February", 27, "Edward Williams", "V") .Add("February", 28, "Edward Williams", "V") End With #End Region 'Init template global settings workbook.Names.Add("TemplateOptions.KeepLineSize", "true") 'Add data source workbook.AddDataSource("ds", datasource) 'Invoke to process the template workbook.ProcessTemplate() ' save to an excel file workbook.Save("EmployeeAbsenceSchedule.xlsx")