Excel file loop Iteration

  • Dear All,

    I am using the For each loop container to loop through the excel file and insert into SQL server destination.

    I am using the expression for this

    "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + @[User::FileName] + ";Extended Properties=\"Excel 8.0;HDR=YES\";"

    When i Execute the package i am getting the below error:

    TITLE: Microsoft Visual Studio

    ------------------------------

    Error at Excel Iteration [Connection manager "Excel Connection Manager"]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.

    An OLE DB record is available. Source: "Microsoft JET Database Engine" Hresult: 0x80004005 Description: "The Microsoft Jet database engine cannot open the file 'E:\SampleExcelFiles'. It is already opened exclusively by another user, or you need permission to view its data.".

    Error at Data Flow Task [Excel Source [585]]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.

    ------------------------------

    ADDITIONAL INFORMATION:

    Exception from HRESULT: 0xC020801C (Microsoft.SqlServer.DTSPipelineWrap)

    ------------------------------

    BUTTONS:

    OK

    ------------------------------

    But i have not ope the Excel file nor Folder.

    Pls help me out in resolving the issue.

    Thanks,

    Gangadhar

  • The first thing that jumps out at me is "The Microsoft Jet database engine cannot open the file 'E:\SampleExcelFiles' ".

    Verify that you're including the actual file name and extension.

    If that's not the problem, I would connect to the server where the file is located using the Computer Management console and look at Shared Files/Open Folders to verify that no one had the file opened.

    Additionally, you should verify that the context under which you're executing the package has permissions to the folder where these files are located.

  • Hi,

    Yes i have not included the exact filename in the E:\SampleExcel path.I have included in the variable starting string it works fine for me.

    Thanks a lot for your help

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply