Visual Studios 2012 VB脚本任务。

编程入门 行业动态 更新时间:2024-10-27 06:25:48
本文介绍了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。 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. 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脚本任务。

本文发布于:2023-11-28 15:52:35,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1643029.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:脚本   Studios   Visual   VB

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!