Check out example codes for "interop C# save as and replace". It will help you in understanding the concepts better.

Code Example 1

//So you can do this to stop DisplayAlerts from appearing:

myApp.DisplayAlerts = false;

//And then if you want to save with specifying a file name, you can do this:
//specifying a file name
myWorkSheet.SaveAs(filename, Microsoft.Office.Interop.Excel.XlFileFormat.xlWorkbookDefault, Type.Missing, Type.Missing, true, false, XlSaveAsAccessMode.xlNoChange, XlSaveConflictResolution.xlLocalSessionChanges, Type.Missing, Type.Missing);
myWorkBook.Close(true);

Learn ReactJs, React Native from akashmittal.com