Getting error message when i am trying to update the excel file using script task in ssis package

Hi Guys,
I am getting error message when I am trying to update the excel. Please find the error messages as below
Error at Update File [Update File]: Failed to compiled scripts contained in the package. Open the package in SSIS Designer and resolve the compilation errors.
Error at Update File [Update File]: BC30002 - Type 'Microsoft.Office.Interop.Excel.Application' is not defined., ScriptMain.vb, 32, 32
Error at Update File [Update File]: BC30002 - Type 'Microsoft.Office.Interop.Excel.Workbook' is not defined., ScriptMain.vb, 33, 25
Error at Update File [Update File]: The binary code for the script is not found. Please open the script in the designer by clicking Edit Script button and make sure it builds successfully.
Warning at Update File [Update File]: Found SQL Server Integration Services 2008 Script Task "ST_050fcae972904039b4f0fe59b7528ece" that requires migration!
and the code that   I am using is
Dell - Internal Use - Confidential
' Microsoft SQL Server Integration Services Script Task
' Write scripts using Microsoft Visual Basic
' The ScriptMain class is the entry point of the Script Task.
Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Runtime
Imports Microsoft.Office.Interop.Excel
<System.AddIn.AddIn("ScriptMain", Version:="1.0", Publisher:="",
Description:="")> _
<System.CLSCompliantAttribute(False)> _
Partial
Public Class ScriptMain
Inherits Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
Enum ScriptResults
            Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success
Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
End Enum
Public Sub Main()
        Dts.TaskResult = ScriptResults.Success
'Dim proc As System.Diagnostics.Process
'kill all instances of excel
'For Each proc In System.Diagnostics.Process.GetProcessesByName("EXCEL")
' proc.Kill()
'Next
Dim excelnacomm As
New Microsoft.Office.Interop.Excel.Application
Dim wbnacomm As Microsoft.Office.Interop.Excel.Workbook
        wbnacomm = excelnacomm.Workbooks.Open("http://test.xlsx")(renamed
the excel)
        wbnacomm.RefreshAll()
        wbnacomm.Save()
        wbnacomm.Close()
        excelnacomm.Quit()
        Runtime.InteropServices.Marshal.ReleaseComObject(excelnacomm)
End Sub
End
Class
Please let me know what could be the reason
Smash126

Download:
Microsoft Office 2010: Primary Interop Assemblies Redistributable
How to: Add or Remove References By Using the Add Reference Dialog Box  /  How to:
Add and Remove References in Visual Studio (C#)
Olaf Helper
[ Blog] [ Xing] [ MVP]

Similar Messages

  • Why am I getting this error message when I try to import? "The following files were not imported because they could not be read. (645)" I can see them :(

    Why am I getting this error message when I try to import? "The following files were not imported because they could not be read. (645)" I can see them
    Is was working this morning!

    Depends on your operating system
    Go to google, try typing in
    Change permissions Windows
    or
    Change permissions Mac

  • I am getting an error message when I am trying to update to iOS 7.0.6

    I am getting an error message on my iPad when I am trying to update to IOS 7.0.6

    What is the error message and number?

  • I receive an Error message when I am trying to authorize the computer o I can read an e-book in adobe digital

    This is the message I receive 
    code:E_adept_request_expired http://adeactivate.adobe.com/adept/activate 2014-08-23T13:32:50-07:00%20(1408825970000)%20before%202014-08-23T14:01:55-07:00%20(14088 27715504)
    Digital Editions encountered an error on the activation server

    Error: E_ADEPT_REQUEST_EXPIRED | Digital Editions

  • Getting Error messages when updating my vaults.

    I got about 26 of these error messages when I am trying to update my Vault! I have no clue why I am getting them.
    ERROR MESSAGE:
    Couldn't create /Volumes/MASTERS/Chuck's Photography Vault 1.apvault/Library/Nature.approject/2010-04-10 @ 09:38:50 PM - 3.apimportgroup/DSC_1509/Info.apmaster

    Anybody ever get an error message like this when trying to update your vault?

  • Keep getting error message when trying to sign in to make a Genius Bar Reservation

    Keep getting error message when trying to sign in to make a Genius Bar Reservation

    Make the reservation by phone. 

  • I get error message when trying to add key tags

    I get error message when trying to add key tags

    You should always backup your iPad before ever doing anything major that coould result in a catastrophic loss is something goes wrong. You can then usually restore from the backup when your iPad has recovered.
    You should also be sure to have transfered any new purchases directly to your iPad to the iTunes app on your computer on a regular basis.

  • Getting Error Message When Trying to Access iTunes Music

    Hi!
    Need some help.
    Little Mac Mini has been through a lot after foobaring after the last update. To bring you up to speed, I had to get Apple Genius Bar to fix the problem but they re-installed the OS by installing 10.4.7, Safari 2.0.4 and iTunes 7.0.x even though it had had 10.4.11, Safari 3.0.4 and iTunes 7.5 on it before the problem. Even when it was offline with Safari and mail crashing, iTunes worked fine. After Apple's re-installing 10.4.7, iTunes had problems and gave me a message that it could not play the video files because the quicktime version was too old. So Quicktime too was re-installed using an older version. Why did Apple Genius Bar fellow do this?
    Anyway... after this I found an underlying problem with the directory and had to restart with Tiger install disc and run Repair Disk to fix it. Then I got the computer back up to 10.4.11, Safari 3.0.4 and iTunes 7.5 using Apple's combo update and Software update. Repaired permissions and verified disk, everything.
    So here is the problem, I can not get iTunes to access my music on the external hard drive anymore. I remember getting a message that suggested that something happened to the xml file.
    Here's the thing: I have two complete copies of the iTunes music on two external hard drives. I also have, in addition to these, a complete copy of the iTunes Music backed up using the Apple program "Back-Up." Usually, I keep iTunes pointing to the music folder on one of the external hard drives, but now, it insists on opening up the iTunes music on the internal which has very little music on it. I know how to open the other music libraries by holding down the option key and starting iTunes and choosing a library. In the past when I did this I got iTunes up with all of my music, etc. fine. I used to be able to access the music library on one external and then switch to the other library by holding the down the option key while starting iTunes. But now, I get a message that says "An iTunes Library file could not be found in the folder 'iTunes Music.' Please change to another" irregardless of which library I choose. What does this message mean? How do I get iTunes to access the music in these libraries again?
    I know that the music libraries are all fine on the externals, because I have gone and found them. All is okay with that, but I can't get iTunes to see them. Could this be because the xml file is missing? I can't seem to find it anywhere. Not in the main hard drive or on any of the externals. If it is missing and I need it, where can I get it and where, exactly do I put it. I am a bit sketchy on my understanding of the file hierarchy as you can tell.
    I do have back-up. Would a restore fix the problem. My little mac only has about 6 gigs left in it's internal so there is not enough room to put the music back into the internal iTunes that it is currently working from. Can I restore the back up version on to one of the externals? I don't know really what to do.
    What am I missing? Thank you so much!- Charlotte

    Well... no response.?
    Anyway.... solved my own problem. Apple should hire me.
    Actually read another post and got an idea. Held down the option key while starting iTunes. Got the window that asks if I want to create a new library or to choose a library. I had been choosing and finding that my libraries on the two external hard drives were damaged. Yes... I think it was because the iTunes Library files and the iTunes Library xml files were missing. So instead of choosing library, I chose to create a new library. Of course it brought up iTunes with nothing in it. I opened the folder "iTunes" on that same external hard drive and boldly clicked and dragged it on to the empty Music section of iTunes. It imported! First importing everything. Music, podcasts, video, audio books, etc. and then imported album art and then boom, it was all there. With trepidation, I closed iTunes and reopened it and yes, all is there still... like in.... it works! It plays! I've been listening to music while typing this.
    Of course, the playlists and play counts, ratings are gone. Yes... I expected that, but I have all of the media and that is what is important. Even the things I downloaded just before the problem happened is in there. Okay... well that's good.
    Hey.... what ever you do, keep back ups and copies, like several and in several formats and all over the place. For instance, most of my music is backed-up in five places. On a cd, also on a dvd, and also in three places on two different external hard drives!
    Okay.. for the weird thing and it's only weird to me because I obviously do not completely understand the file system in the mac. It's this: Before I created this new library, when I went to the external hard drive I found the folder labeled "iTunes" and no other folders. The iTunes folder only contained the media content and I could not find the library or library xml files. Now after importing that one iTunes folder into the newly created library and allowing it to get everything into it, going to the external hard drive I had expected to see a new folder with a new copy of all of the music content in it but instead I found a new folder labeled " iTunes1" and opening it, I found the library and library xml files. Ah.... so if I am understanding this correctly, what "creating a new library" did was to add in new the library and library xml files that were missing, but it still accessed the "iTunes" folder with all of the content that was already there. So... in essence fixing the problem. Yes... this would be correct because the external has the same amount of gigs used as it had before I created the new library. This is way cool! And no, I did not mess anything up, my computer's internal hasn't enough space for the iTunes music content and it's showing the same amount of space used so it's not like it moved the stuff into the internal. It couldn't do that, anyway.
    I shall thank the guys on the other post for their help. Hope this helps others.
    By the way... this whole problem happened originally because apparently my hard disk had errors in the directory and the downloading of the last security update (security update 2007-009) was just too much for it.
    Look before updating always check by going to Utilities and performing a "permissions repair" and also running "Verify disk," even if you see that your S.M.A.R.T. disk shows "verified." If verify disk shows any errors or problems then perform a disk repair. Do this before any update or installation or you may run into serious trouble. To do this get out your OS install disk. Use the Tiger one if your computer is currently running Tiger. Leopard one if it's using Leopard. Put the disk in and re-start your computer. As soon as it is off and before it even begins to start up, hold down the C key on the keyboard and keep holding it down until you get the message asking what language you want. Don't panic, this is correct. It will look like it wants to install the OS again. Don't re-install the OS. But you can choose the language. Here I was panicking and I don't want you to. At the top you will see the installer bar. Go to Disk Utility up on that bar and click on that, it will take you to Disk Utility and you will then and only then be able to perform a disk repair by clicking on "Repair Disk." Do it! Do it a couple of times until the thing reports that the disk has no problems. I forgot how it states this but I do remember that the lettering is in green. Green is great! Close Disk Utility. Quit Installer. A window will come up asking you to choose where to restart from so choose your internal hard drive and it should restart and be good to go.
    Trust me, the updates are fine. 10.4.11, Safari 3.0.4 and iTunes 7.5 are good, it's existing problems in your computer's directory or keychains that is causing the problems when updating or installing new stuff. I had to learn all of this the hard way, even though I tried to keep my mac clean and in top shape, and even though I asked and asked the Genius Bar guys at the local Apple store if there is anything more I needed to know to prevent difficulties. I learned all this here, in these discussions, in answer to my posts under other sections. Thanks Klaus1, Hawaiian_Starman, dechamp, and baltwo!
    Okay.. if I got anything wrong in my descriptions, please, please correct me! I don't want to be inaccurate. I want to know this stuff!
    Thank you so much for persevering through my long post, here. -Charlotte

  • I am trying to sync to Outlook 2010.  I get a weird error message when I am trying to setup on my pc.  Its not english.  It says "der automatische refresh konnte nicht gestartet werden"  Help!

    I am trying to sync to Outlook 2010.  I get a weird error message when I am trying to setup on my pc.  Its not english.  It says "der automatische refresh konnte nicht gestartet werden"  Help!

    Hello,
    '''Try Firefox Safe Mode''' to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.
    ''(If you're not using it, switch to the Default theme.)''
    * On Windows you can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac you can open Firefox 4.0+ in Safe Mode by holding the '''option''' key while starting Firefox.
    * On Linux you can open Firefox 4.0+ in Safe Mode by quitting Firefox and then going to your Terminal and running: firefox -safe-mode (you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    * Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    [[Image:FirefoxSafeMode|width=520]]
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''
    Thank you.

  • Get error message when trying to install windows. need to remort hd. how to

    tried to install xp with bootcamp. get error message when trying to partion the disk:"the disk can not be partioned because some files cannot be moved.
    back up the disk and use Disk Utility to format it as a single Mac OS Extended
    (Journaled) volume. Restore your information to the disk and try using Boot Camp
    Assistant again."
    bought an external hd and used time machine to back up everything. do not understand how to reformat the hd with disk utilities. any help is appreciated

    Hi and welcome to Discussions,
    have a look at the answers in this thread http://discussions.apple.com/thread.jspa?threadID=1972468&start=0&tstart=0 for an easier way to do this.
    Regards
    Stefan
    Message was edited by: Fortuny

  • Get error message when trying to launch bridge from CC 64 bit.

    Get error message when trying to launch Bridge from Photoshop CC 64 bit.  "Cannot complete command because extension cannot be loaded."  Need fix.  Thanks.

    Hi Adobe Bubba,
    Please uninstall the software, run the cleaner tool, restart your machine and install again.
    Cleaner tool: http://www.adobe.com/support/contact/cscleanertool.html .
    Regards,
    Romt Sinha

  • Get error message when trying to sync iphone to puter that says"cannot connect because apple mobile divise is not started? what do i do?

    get error message when trying to sync iphone to puter that says"cannot connect because apple mobile divise is not started? what do i do?

    Restart your computer and the iPhone. Press & hold the Power and Home buttons together for 10+ seconds, ignoring the red power-off slider, until you see the Apple logo. It is safe to do, there should be no content loss. It is the same as rebooting your computer.

  • HT5731 Have 55GB available, but get error message when trying to download movie to add storage

    Have 55GB available, but get error message when trying to download movie to add storage

    Go to Settings>General>Usage>Storage. Let all of the apps load in the window. You can see how much storage you have used and how much you have left. You will need about twice the size of the download of free storage in order to be able to download the movie. Also, the iOS will not let you use every bit of available storage on the device.
    You can delete content in there if needed, but if you sync with iTunes it's a good idea to transfer purchased into iTunes and backup your iPad before you delete content. If you use iCloud only, backup with iCloud before you delete any content.
    How to transfer purchases into your iTunes library
    http://support.apple.com/kb/HT1848
    How to backup and restore from a backup
    http://support.apple.com/kb/HT1766

  • HT4623 While trying to sync my ipad, it became stuck in the recovery mode and I get error messages when I try to recover

    While trying to sync my IPAD with ITUNES, my IPAD when into recovery mode and I keep getting error messages when I try to recover it.

    What might these error messages say?

  • I keep getting error message when trying to sign in for iMessage with my Apple ID since upgrading to iOS 7

    I keep getting error messages when I try to activate iMessage on my iPad since installing iOS7. Anyone else having this issue or a solution. I can obviously sign in with the same Apple ID information/password as I have done here and I am connecting with Wifi now and in all other apps.

    After looking at some other posts I signed into iTunes and edited my password with my Mac. Then I powered off and restarted my iPad and all is good now.

Maybe you are looking for

  • IDOC: FB70: Customer Invoice

    Hi, I want to post document using tcode FB70. Please provide me the IDOC for the same. These are the fields which i want to pass to the IDOC: Account  (Customer) Amount Transaction Document Date in Document Baseline Date for Due Date Calculation Post

  • ADF 11g: turn off validation pop-up windows

    Hi all, Does anyone know how to turn off the pop-up messages with ADF 11g? I am using Jdeveloper 11.1.1.4.0. I need to display the error messages on the page. I have added Message components to the page to display the error messages. Now it displays

  • Private interconnect oracle 10g RAC configuration

    Can you please answer below questions? Why does a private interconnect need a switch, and why is straight through cables not supported.

  • Can't locate original song files from iTunes

    I purchased songs from iTunes & cant locate original files on my computer/iPod.  Searched harddrive, recycle bin, etc.  When you click on song title in library, states cannot locate original files and asks me to locate.  Yet when I try to redownload

  • Where can I find the JCOP tutorial?

    The " Load" APDU command of my card is a little different from that of the JCOP. So if I use JCOP to load applets to my card, there will be error. So I wonder if I can modify the default parameters of APDU command in JCOP. Or is there a JCOP tutorial