I am running a coded UI automation test, to test a winforms application. during the test the automation press a button that opens an excel file that contains a data.
how can i access this excel file and save it (i want to save it by using Microsoft.Office.Interop.Excel.Application).
when i start my automation test i already open new instance of excel , this excel will be used to save data from the test and i close it only it the end of my test.
i tried to use
app = (Excel.Application)Marshal.GetActiveObject("Excel.Application");
with no luck