Question : Importing the  Excel file into SQL Server via SSIS - Excel data is not in table format

Hi Experts,
I am new to the SSIS.  
Could you please point me a right direction as I do not know what resources or ways are available to solve the issue.  

I am trying to import the Excel data ( not table format) into the SQL Server via SSIS.
The error pop up message shows up as, "External table is not in the expected format".  
Do I need to change the Excel data writing code in VB(A) before implementing the SSIS importing?

Regards,
T

Answer : Importing the  Excel file into SQL Server via SSIS - Excel data is not in table format

If you want to select specific rows you have two option:

1- write a query instead of selecting sheet name in excel data source like this:

SELECT        F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12
FROM            ['Case with not table formated$']
WHERE        (F2 IS NOT NULL)

in this way you need to specify your rows by a where clause, in this example all rows that has F2 not null was fetched. but you must find a way to specify your data in where clause.

2- use an OLE DB Data source instead of excel, and connect to sql server
write a query with OPENROWSET() and fetch data from excel.
like this:
http://bensullins.com/adding-a-row-number-to-an-excel-source-in-ssis/

remember you can add row_number() to your query results and then select any row_number you want from the results.

Does it make sense to you?

Random Solutions  
 
programming4us programming4us