//======== WORK !!! private void btnSaveChange_Click(object sender, RoutedEventArgs e) { WriteReadExcel writereadExcel = new WriteReadExcel(); dataSet.AcceptChanges(); writereadExcel.writeToExcel(dataSet); }