Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

External table is not in the expected format

$
0
0

"External table is not in the expected format"

I am downloading a data into excel in client end, ie) exporting data into excel and file saves in Excel 97 - 2003 format.

But if i open the file i am getting a popup saying "The file you are trying to open "Template.xls" is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file.Do you want to open the file now?"

But if i use the same file to upload data , i am getting the error "External table is not in the expected format" while connecting to the excel file, ie) when i open the connection to the excel

i have tried with different providers as well("Provider=Microsoft.ACE.OLEDB.12.0; Data Source = C:\\Users\\lal\\Desktop\\Excel\\Template1.xls; Extended Properties = 'Excel 12.0; HDR = YES;IMEX=1'")

I have Excel 2010 installed in my machine.

And if create a excel file locally and upload , i am not getting any error.

I am not able to resolve the issue, plz help me.... :) thanks


Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>