help on this DTS

  • Hi all,

    I have this DTS running from Excel to SQL but the when the table changes in Excel file the job fails. How can i keep Sheet(table) name same and stop it to fail everything the file changes.

    thanks

     

  • Hello,

    What exactly is it that changes about the Excel file?  Is it just the data that changes, or is it the column names, or is it the number of columns?  If the data changes, does the datatype(s) change significantly?  The answers to these questions would determine what you need to do.  For example, if the column names change in the Excel file, then when the DTS package runs, the package will still look for the column names that were used when the package was created.  If it doesn't find ALL of them, the package will fail.  Or, if the data changes and a datatype is sent through that is incompatible with the datatype for that column in the DTS transformation, the package could also fail.  It just depends.

    Have a good one! 


    Kindest Regards,

    VL

  • no the table namce changes in excel file. I mean the sheet name from test to test1130 and dts looks for test and it fails until i set it to correct table name on excel file.

    thanks

  • I think you should use an ActiveX script with the Excel object model to examine the sheet name(s) and return that name to a global variable which you can then use  as input to a dynamic global variable to change the data source. 

    I know of no way directly to query?? the excel file. Maybe there is some way first set it as a ODBC data source and then query like a db somehow? Just quessing on this one.

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

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