Error reading a csv (already open in Excel) using SSIS

  • hi,

    I'm loading data into a table from a csv file using a data flow task.

    If the file is already open by a user in Excel the SSIS is not able to read and instead throws out the message "The process cannot access the file because it is being used by another process"

    This never happens if the csv is open in a notepad.

    Is it possible that even if the file is pen in excel the SSIS can still read.Please remeber that SSIS just need to read the data and doesn't care about any unsaved data in the file.

  • push another copy of the file over for SSIS to use.... or push another copy over for users to look at.

    The probability of survival is inversely proportional to the angle of arrival.

  • thanks , I'm sure this soultion would work , howeevr i was still interested to know whether it is possible to use the same file in 'Read Only' mode just as we do in in windows.

  • Hi,

    just an idea. Maybe is an indirect way, but what about to use a Script Component or a Script Task and use C# to proccess the csv file. There is a method to open a file in Read mode in the System.IO.File. There are also several code snippets in the Web to read csv files with C# like here.

    The problem with the flat file source is you cannot configure to many parameters, therefore you do not have too many options with it.

    Hope this helps.

    Kind Regards.

    Paul Hernández

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

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