I\'m trying to read an Excel (xlsx) file using the code shown below. I get an \"External table is not in the expected format.\" error unless I have the file already open in
My scope consists of template download and verifies the template when it's filled with data So,
1) Download a template (.xlsx) file with the header row. the file is generated using openxml and it's working perfectly.
2) Upload the same file without any change from it's downloaded state. This will cause a connection error and fails (OLEDB connection is using for reading the excel sheet).
Here if the data is filled the program works as expected.
Anybody having an idea the issue is connected with the file we are creating it's in xml format if we open it and just save convert it in to excel format and it works well.
Any idea to download the excel with the preferred file type?