• Thanks Frank. You are the man.

    I modified your script according to my requirement.

    Can you please let me know how to add more columns in excel file. your script will add only one column. I think we need to modify the following line of code.

    SET @ObjProp='Application.ActiveWorkbook.Sheets(1).Cells(' + cast(@Counter as varchar(2)) + ', 1).value'