Struggling with an issue. Need to download a file from a webportal. Now i managed to do that using SSIS script task. Here comes the real issue.
Now when i download the file as .xls. Downloaded file appears to be Excel 97-2003 Worksheet but actually it isn't. It's an XML Spreadsheet 2003(.xml).
Now when i try to open this downloaded file, it comes up with an error message (Attached). So my SSIS package can't open the File as an Excel source and i can't even use XML source editor as some of the field values in file are not supported by xml editor so it throws an error message.
When i open the downloaded File and save it as a genuine .xls, xlsx or csv file. Then it works perfectly fine and package loads the file.
when i try to download it from Portal as a .csv or .txt, it downloads the file in strange format.
So i am stuck now, I have tried so many different approaches, but its not working. I have also tried "File Task System" functionality in ssis to rename the downloaded file. Even though file extension is changed but source editor still won't like the file format. Any help with would be appreciated.
Below is the solution for above issue. I ended up adding another script task in SSIS package that will change the downloaded xml to xls or csv.I then used "using Excel = Microsoft.Office.Interop.Excel;" from .NET assembly and added below C# script
public void Main() {
I had this same issue. I used the following Excel Connection Manager connection string and it worked for me: