LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error when calling RGT tool kit

Solved!
Go to solution

Hi,professionals,I am using RGT tool kit to read data from excel documents and joint the data together.Here below is the diagram.
00-.png
When I click the 'run' button ,it usually run well ,with the screen spangles three times and a jointed big 2-dimension string array.But sometime it does not run well,saying 'Report Generation Toolkit: Microsoft Word or Excel did not open. Make sure Microsoft Word or Excel is installed.',and what was worse is that such phenomenon has no laws,absolutely random with a small  probability.I 'run'ed three times ,this error appeared once.

after I build a exe file,this thing turned bad ,the exe just get the first document's data, droped the last two documents' data(I have verified it by some other codes).I guess it is must  associated with the error phenomenon when in source code.

0 Kudos
Message 1 of 4
(3,261 Views)

I'm not sure, but try inserting a wait after the Close function. A "Stall Data Flow" VIM on the error wire from the last node to the side of the For loop (ignore the tunnel) should be fine.

 

If you don't have 2017 (and the Stall Data Flow VIM) then you can just use a Flat Sequence Structure and a Wait (ms) node and pass the error wire to the left side of the FSS. Try setting the wait to a second and see if it helps.


GCentral
Message 2 of 4
(3,241 Views)
Solution
Accepted by topic author alii001

Yes, trying to open a New Report after saving an old one can get you "stuck".  I encountered this, went nuts trying to figure it out, and noticed that the problem didn't occur when I had Highlight Execution turned on (which slows things down ...).

 

I went looking through some older code where I know I documented this (for myself), but, of course, can't find it.  I recall something like a half-second delay seemed to work, but you should do some testing, as it might depend on your system, version of Office, etc.

 

Bob Schor

0 Kudos
Message 3 of 4
(3,222 Views)

Thank you , after I insert a delay(ms) ,it seems work fine.

0 Kudos
Message 4 of 4
(3,208 Views)