I don't know of a solution where you could just convert your repeater to excel but I just wanted to show you how I exported my repeater to excel in a recent project...
My repeater contains a gridview in my ItemTemplate then I just loop through my tables and add the styling as I go... Hope this will help you...
List<DataTable> data = GetMyTables();
using (ExcelPackage pck = new ExcelPackage())
{
ExcelWorksheet ws = pck.Workbook.Worksheets.Add("Sessions");
int CurrentRow = 1;
foreach (DataTable dt in data)
{
ExcelRange rand = ws.Cells[CurrentRow, 1, CurrentRow, dt.Columns.Count];
rand.Merge = true;
ws.Cells["A" + CurrentRow.ToString()].Value = dt.TableName;
ws.Cells["A" + CurrentRow.ToString()].Style.Font.Bold = true;
CurrentRow += 2;
ws.Cells["A" + CurrentRow].LoadFromDataTable(dt, true);
using (ExcelRange range = ws.Cells[CurrentRow, 1, CurrentRow, dt.Columns.Count])
{
range.Style.Fill.PatternType = OfficeOpenXml.Style.ExcelFillStyle.Solid;
range.Style.Fill.BackgroundColor.SetColor(ColorTranslator.FromHtml("#498af3"));
range.Style.Font.Color.SetColor(Color.White);
}
using (ExcelRange range = ws.Cells[CurrentRow, 1, CurrentRow + dt.Rows.Count, dt.Columns.Count])
{
range.Style.Border.Bottom.Style = OfficeOpenXml.Style.ExcelBorderStyle.Thin;
range.Style.Border.Left.Style = OfficeOpenXml.Style.ExcelBorderStyle.Thin;
range.Style.Border.Right.Style = OfficeOpenXml.Style.ExcelBorderStyle.Thin;
range.Style.Border.Top.Style = OfficeOpenXml.Style.ExcelBorderStyle.Thin;
}
CurrentRow += dt.Rows.Count + 2;
}
ws.Cells[1, 1, CurrentRow - 1, data[0].Columns.Count].AutoFitColumns();
Response.Clear();
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
Response.AddHeader("content-disposition", "attachment; filename=file.xlsx");
Response.BinaryWrite(pck.GetAsByteArray());
Response.End();
}