// export Excel private void button1_Click(object sender, EventArgs e) { backend.ExcelHandler handler = new backend.ExcelHandler(); List <backend.Movies> mov = handler.ImpExcel(tbLoadExcel.Text); populateList(mov); }
// load from file private void button3_Click(object sender, EventArgs e) { //create excel save handler backend.ExcelHandler handler = new backend.ExcelHandler(); //create List of movies backend.MovieList movlis = new backend.MovieList(); //load the list from listview movlis.ListOfMovies = retrive(); try { //save to file handler.ExportExcel(movlis, tbSaveExcel.Text); } catch (Exception x) { MessageBox.Show("fileName Bad" + x); } }