キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

Automation open error

解決済み
解決策を見る

HI , I faced an error while I try to open the excel program in labview, when I tried to run the program, I get the problem but when I delete the stack sequence then it become Ok , and I don't know why, cansomebody please help me.

 

Thanks

0 件の賞賛
メッセージ1/6
3,798件の閲覧回数

I did not have a problem running your program as is

 

If I where you I would first wire all the error clusters in the order of which you want events to happenMake sure you are not closing a reference before you are done using itOn your machine you might still be trying to get the worksheet in excel but your LabVIEW code has moved on to closing a reference.

Brian
0 件の賞賛
メッセージ2/6
3,767件の閲覧回数
解決策
受理者 williamlee1982

You don't have any of the error clusters wired, so if there's an error along the way you'll never know. A couple of glaring issues:

  • You are unnecessarily creating references which you already have. Specifically: you are using the Worksbooks.Application property to get the reference for the Excel application, which you already have. It's an input to the VI! 
  • You must close references in the opposite order in which you created them. Therefore you must use the error cluster to force a sequencing of closures. Your Close Reference functions have no such dependency, thus you cannot know ahead of time which one will execute first. 

 

I would suggest perusing the Excel thread for some examples on how to manipulate Excel via ActiveX.

メッセージ3/6
3,761件の閲覧回数
Hi Brian and smercurio_fc I already know what's problem. Thanks for your help and your example. Have a great day.
0 件の賞賛
メッセージ4/6
3,751件の閲覧回数

Hi,

Does anyone know how I can have the Automation Open vi. automatically save a new file?  I'm trying to auto-save a new file every second.

Thanks,

 

0 件の賞賛
メッセージ5/6
3,638件の閲覧回数
That question doesn't really make any sense. Automation Open simply opens a reference to an object. It has nothing to do with saving of anything. If you want to save something at whatever period you want then you need to have a loop that runs at that rate and calls the Save method (or whatever it's called) for the class that you're accessing.
0 件の賞賛
メッセージ6/6
3,635件の閲覧回数