Get Reference of Active Excel Sheet

Introduction
This blog gives an code snippet for getting reference of a excel sheet that is running in process or opened excel sheet. using
System.Runtime.InteropServices you can get reference of the opened excel sheet. see the below code will understand mo

  1. Excel.Application MyExcelApplicaton= (Excel.Application)System.Runtime.InteropServices.Marshal.GetActiveObject("Excel.Application");