0
votes

I have been facing issues while package execution.

What I have Done :

I have created a Template which has only header in it and I have a table "Product". I tried to insert the data into excel sheet from "Product" table by using the excel template. I have used 3 variable.

Flow : File System Task => Data Flow Task => OLE DB Source => Excel Destination.

Error :

[Excel Destination [2]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E37.

[Excel Destination [2]] Error: Opening a rowset for "result$" failed. Check that the object exists in the database.

[SSIS.Pipeline] Error: "Excel Destination" failed validation and returned validation status "VS_ISBROKEN".

Thanks

1
VS_ISBROKEN usually means the columns changed.KeithL
Thanks for the reply @KeithL Column name are same in template and SQL Table.Learner
well do you a tab in Excel labeled result (proper case)? BTW, if you aren't formatting excel it would be a lot easier to write output to a csv which can be opened with excel.KeithL
@KeithL I have tried with tab name "Sheet1" and now rename the tab name "result" ( just for experiment). Actually I have following the tutorial, so I want do this with his way. otherwise I have inserted the data into excel sheet scuccefully without the template. youtube.com/…Learner

1 Answers

0
votes

This is miracle. I just solved this error...

You don't need to create a template (dummy) excel, you need only 3 components.

1. Create Execute SQL Task according to this tutorial.

When set everything except SQLStatement I suggest creating empty excel and connect to OLE DB source (your server table). When you add excel destination and connect with excel destination manager, you will see question that VS ask if you want to create table like this query (but with different data types):

CREATE TABLE `Result` (
    `ColName1` NVARCHAR(255),
    `ColName2` NVARCHAR(255),
    `ColName3` NVARCHAR(255),
    `ColName4` NVARCHAR(255)
)

I don't know if I explained well, but you have previous step in tutorial.

2. Execute this task

3. Add Data Flow Task with OLE DB Source and Excel Destination

With OLE DB select all that you need from your Product table

Connect Excel Destination with SAME Excel Connection Manager like in Execute SQL Task. From drop-down select Result sheet name.

When you finish this delete this empty excel

4. Create a variable that will contain path and excel file name

5. According to tutorial from first step, click on Excel Connection Manager -> Properties -> Expressions -> ... (on right) -> ExcelFilePath (from drop-down). In 2nd column write @[User::YourVariableName]

Crucial step

6. In control flow, click on Data Flow Task and in properties for DelayValidation set True.



If you have a question, write me in comment below.