SSIS Script Task - Reference Build Error Message

  • Someone gave me a bit of C#.Net code to assist me with deleting the top row of an Excel worksheet. He tested it in a test project and it worked fine for him. When I try to add it to my SSIS package script task, however, I get a reference error of:

    The type or namespace name 'Office' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

    The reference in question is "using Excel = Microsoft.Office.Interop.Excel;"

    Now, the script has no squiggly lines to indicate any errors, not even when it calls the Excel object methods. So, I'm at a bit of a loss. Obviously he has something on his machine that I do not have, that he didn't run into this error. I'm running Windows XP OS with SQL Server 2008 SP2, using BIDS on my local desktop. I also have Visual Studio 2008 installed, but I tend to work in the BIDS interface when I can.

    Any thoughts on what my machine could be missing that I get this error?

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Fixed!

    Resolved the problem by editing the script, opening up Project Explorer, right-clicking References and adding a Reference to Microsoft.Office.Interop.Excel.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

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

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