Updating a single Excel cell using SSIS

Who is online?  0 guests and 0 members
Home  »  Blogs  »  KeithHyer  »  Updating a single Excel cell using SSIS
bsingha likes this.
 
4.78
/5
Avg: 4.78/5: (1 votes)

Comments (8)

lcarpay
lcarpay said:
hi Keith, I'm getting an error. Any suggestions by any chance? Couldn't figure it out. thanks Leon Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80028018): Old format or invalid type library. (Exception from HRESULT: 0x80028018 (TYPE_E_INVDATAREAD)) at Microsoft.Office.Interop.Excel.ApplicationClass.set_DisplayAlerts(Boolean RHS) at ST_22efcf4bfb1441f6a81feb9e2dbfbd50.vbproj.ScriptMain.Main() --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()
1/17/2012
 · 
 
by
KeithHyer
KeithHyer said:
You may need to load the Office Interop Assemblies - http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=18346. One thing to check is the output of the batch file when it runs. It "completed" for me the first time I tried it - but when I checked, there was an invalid path to the GACUtil.exe application. This resulted in the assemblies not being registered correctly. If you're running a 64-bit OS, you also might need to run the package in 32-bit mode. Devin Knight has a blog showing how to set that up: http://www.bidn.com/blogs/DevinKnight/ssis/258/running-ssis-32-bit-drivers-or-tasks-on-a-64-bit-machine
1/17/2012
 · 
 
by
KeithHyer
KeithHyer said:
Here's the link for the 2003 version: http://www.microsoft.com/download/en/details.aspx?id=20923
1/17/2012
 · 
 
by
KeithHyer
KeithHyer said:
Here's the link for the 2010 version: http://www.microsoft.com/download/en/details.aspx?id=3508
1/17/2012
 · 
 
by
KeithHyer
KeithHyer said:
Icarpay - I also found this - may be helpful: http://www.add-in-express.com/creating-addins-blog/2009/02/13/old-format-invalid-type-library/
1/17/2012
 · 
 
by
Alice_1
Alice_1 said:
Very helpful! Alice@Code 39
2/9/2012
 · 
 
by
magelan913
magelan913 said:
It still keep process created in memory(Excel.exe*32).. So more times you run package - more instances will be visible in task list.. Somehow it's not close excel file after all..
2/13/2012
 · 
 
by
KeithHyer
KeithHyer said:
Thanks for pointing that out, magelan913 - I'll take a look around and see if I can find a fix for that.
2/13/2012
 · 
 
by
KeithHyer
KeithHyer said:
I've updated the code so it grabs the hWnds of the Excel objects that gets created. Once the work is done, I loop through the running processes to locate those hWnds again and kill their processes. This SHOULD work even if you have another session of Excel open which the package didn't initiate ( though I didn't test for that specifically ).
2/14/2012
 · 
 
by
KeithHyer
KeithHyer said:
To give credit where it's due - I found the concept on this URL: http://social.msdn.microsoft.com/Forums/en-US/innovateonoffice/thread/65f9721f-e1a1-4757-8273-a77f526eee49
2/14/2012
 · 
 
by
magelan913
magelan913 said:
This solution is required to install additional component(s) on server where the package will run. Basically, if you use excel connection manager and use sql task with query like this: update [My_Sheet$A5:A5] SET f1=null you can also do simple things without using scripts(additional component). Every case is different though and there's maybe needs for scripts to do more advanced tasks..
2/15/2012
 · 
 
by
Blogs RSS Feed

KeithHyer's latest blog posts

Blogs RSS Feed

Latest community blog posts