I had tried the following code, But it is throwing a fatal error saying it could not able to load excel DLL even after adding it in reference.Excel.