Visual Studios 2012 VB脚本任务。 [英] Visual Studios 2012 VB script task.

查看:65
本文介绍了Visual Studios 2012 VB脚本任务。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了我的团队成员Visual Studios 2012 VB脚本任务的问题。

I am having an issue with one of my team members Visual Studios 2012 VB script task.

她不再能运行使用Interop的脚本任务。   该任务基本上打开了一个excel文件(2007)并将其转换为2010或xls转换为xlsx。 .net 4.5和Interop 1.7加载到她的计算机上,似乎运行正常,但是当她执行
任务时,她得到一个preverbal通用运行时错误

She no longer can run a Script task that uses Interop.  .  The task basically opens up a excel file (2007) and converts it to 2010 or xls to xlsx. .net 4.5 and Interop 1.7 are loaded on her computer and seems to running fine however when she executes the task she get a preverbal generic Runtime error

 我遇到了麻烦这就是死亡,只是想出没什么。 我能说的是当excel试图在她的计算机上打开时发生故障。

 I have trouble shot this to death and just coming up with nothing.  What I can tell is when excel is trying to open on her computer that is when the failure occurs.

所以在下面的代码中,当excel.visible = true执行时你可以看到她的任务管理器excel打开,然后发生运行时错误,代码停在那里。 

So in the code below when excel.visible = true executes you can see on her task manager excel opening, then the runtime error occurs and the code stops there. 

在这些之后还有其他代码,所以不要强调"End Sub""End Class"不在下面。我只是没有复制所有代码,只是问题开始发生的地方。

There is other code after these so don’t get raped around the "End Sub" "End Class" not being below. I just did not copy all the code, just too where the problem starts to happen.

对于某些背景,她的电脑被重新成像,并重新加载了Visual Studios。 所有其他任务在她的计算机上运行正常。只有涉及Interop的那个不起作用。 

For some background her computer was reimaged and Visual Studios was reloaded.  All other tasks are working fine on her computer. Only the one where Interop is involved is not working. 

可能导致这种情况的原因是什么?任何帮助将不胜感激。 谢谢

What could be possibly causing this? Any help would be greatly appreciated.  Thanks



进口 系统


Imports System.Data


Imports System。 Math


进口 Microsoft.SqlServer.Dts.Runtime


进口 Microsoft.Office.Interop.Excel





< Microsoft.SqlServer.Dts.Tasks.ScriptTask。 SSISScriptTaskEntryPointAttribute >
_


< System。 CLSCompliantAttribute False )>
_


部分
公共

ScriptMain


    
Inherits Microsoft.SqlServer.Dts.Tasks.ScriptTask。 VSTARTScriptObjectModelBase



    
枚举
ScriptResults


           Success = Microsoft.SqlServer.Dts.Runtime。 DTSExecResult 。成功


           Failure = Microsoft.SqlServer.Dts.Runtime。 DTSExecResult 。失败


    
结束
枚举




    
公共
Sub Main()



        Dts.TaskResult =
ScriptResults 。成功



       
暗淡 excel
As
Microsoft.Office.Interop.Excel。 申请


       
'Dim wb As Microsoft.Office.Interop.Excel.Workbook




        excel.Visible =

推荐答案

您好ajolson1964,

Hi ajolson1964,

转到Excel为开发者论坛提供更好的支持,感谢您的理解:)

Move to Excel for developer forum for a better support, thanks for your understanding :)

最好的问候,

Xavier Eoro

Xavier Eoro


这篇关于Visual Studios 2012 VB脚本任务。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆