Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: ''object' does not contain a definition for 'get_Range''
Excel.Range r = excelApp.get_Range(activeworksheet.Cells[i, 1]);
private readonly OleDbConnectionStringBuilder _builder = new OleDbConnectionStringBuilder { Provider = "Microsoft.ACE.OLEDB.12.0", DataSource = "S:\\Customer_Service\\Wires\\Database for CSC\\Backend data of databse do not open\\CSC.accdb" }; public DataTable Read() { var dt = new DataTable(); using (var cn = new OleDbConnection { ConnectionString = _builder.ConnectionString }) { using (var cmd = new OleDbCommand { Connection = cn }) { cmd.CommandText = @"TRANSFORM Count(Complaint_Number) AS [Total Numbers] SELECT Nature_of_problem, Count(Complaint_Number) AS[Total Numbers of Issues] FROM master_table GROUP BY Nature_of_problem PIVOT Format(Complaint_Received_On, "mmm") In("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"); cn.Open(); dt.Load(cmd.ExecuteReader()); } } return dt; } }