public static void exportToExcel() { List <Customer> customers = new List <Customer>(); customers = business.AllInfo(); business.ExportToExcel(customers); Console.WriteLine("data exported to excel file successfully "); }