Question: how to convert mdf to excel?
Answer: Create a connection to your database.
Select all Rows und Columns you need from you tables in the database This should helpe you: ADO.Net.
Create a new Excel-Sheet (Take a look at Open XML) This should heklp you: Create Excel-Sheet.
Fill you Excel-Sheet with the selected datas from your Database.