You can use this code
SPVirtualServer virtualServer = spGlobalAdmin.OpenVirtualServer(new
Uri(http://server-name));
SPSiteCollection collections = virtualServer.Sites;
SPSite site =collections[selValue];
foreach(SPWeb web in site.AllWebs)
{
if(web.Name =="reports")
{
SPWeb reportweb= site.AllWebs["reports"];
SPFolderCollection folders= reportweb.Folders;
foreach(SPFolder folder in folders)
{
#region
if(folder.Name == "Monthly Reports")
{
foreach(SPFolder subfolder in folder.SubFolders)
{
// for folder name pci for nov/dec
foreach(SPFolder childfolder in subfolder.SubFolders)
{
if(childfolder.Name== FolderList.SelectedItem.Value)
{
SPFile file = childfolder.Files[ExcelList.SelectedItem.Value];
byte[] binFile = file.OpenBinary();
string path1 = @"c:\Reports.Xls";
// Delete the file if it exists.
if (File.Exists(path1))
{
File.Delete(path1);
}
// Create the file.
using (FileStream fs = File.Create(path1))
{
//Byte[] info = new UTF8Encoding(true).GetBytes("This is some text in the
file.");
// Add some information to the file.
fs.Write(binFile, 0, binFile.Length);
fs.Close();
}
break;
}
}
}
}
#endregion
}