Click here to Skip to main content
15,900,511 members

Comments by Bitla Phanindra (Top 11 by date)

Bitla Phanindra 23-Jun-14 12:03pm View    
The foreach you have at the top might be causing the issue.
Bitla Phanindra 23-Jun-14 11:38am View    
What error are you getting?
Bitla Phanindra 23-Jun-14 11:35am View    
Check my comment below..
Bitla Phanindra 23-Jun-14 11:34am View    
You can try it this way..
if (FilePath.Trim().EndsWith(".xlsx"))
{
strConn = string.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=\"Excel 12.0 Xml;HDR=YES;IMEX=1\";", FilePath);
}
else if (FilePath.Trim().EndsWith(".xls"))
{
strConn = string.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=1\";", FilePath);
}
Bitla Phanindra 20-Nov-12 1:39am View    
Use Google buddy, instead of posting a question here.