ApplicationClass excelApp = new ApplicationClass();
Workbook workbook = (Workbook)excelApp.Workbooks.Add(Missing.Value);
Worksheet worksheet;
string SourcePath = "D:\\Excel\\Emp.xls";
string Path="D:\\Excel\\";
string DestPath = Path +"Emp_"+ txtID.Text + ".xls";
System.IO.File.Copy(SourcePath, DestPath);
workbook = excelApp.Workbooks.Open(DestPath, 0, false, 5, "", "", true, XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0);
worksheet = (Worksheet)workbook.Sheets.get_Item(1);
((Range)worksheet.Cells["5", "C"]).Value2 = txtName.Text;
((Range)worksheet.Cells["6", "C"]).Value2 = txtID.Text;
((Range)worksheet.Cells["7", "C"]).Value2 = txtDesignation.Text;
((Range)worksheet.Cells["8", "C"]).Value2 = txtDept.Text;
((Range)worksheet.Cells["9", "C"]).Value2 = txtDate.Text;
((Range)worksheet.Cells["5", "E"]).Value2 = txtAppraiser.Text;
((Range)worksheet.Cells["6", "E"]).Value2 = txtReviewer.Text;
((Range)worksheet.Cells["7", "E"]).Value2 = txtHeadOfDept.Text;
((Range)worksheet.Cells["8", "E"]).Value2 = txtPreviousProcess.Text;
workbook.Save();
workbook.Close(0, 0, 0);
excelApp.Quit();