LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel Report generation

Solved!
Go to solution

Good point!  I think it may have to do with the version of Office, as well.  I recall you (or someone) reporting problems with Save Report that I didn't see until I was "force-transitioned" to Office 2016 and/or Office 365 (shudder).  Zazza -- this is worth testing on your system ...

 

Bob Schor

 

Gregory -- I re-read your response, and picked up on "it doesn't even appear to the user that Excel is being opened".  Is it possible that it isn't?  [I doubt it, maybe I should take my own advice and "do a test" ...].

0 Kudos
Message 11 of 16
(1,187 Views)

Hi Bob,

I'm not sure, I know very little about ActiveX. Here is a little capture of what I see. Notice that Excel (bottom left icon) does not open until I double-click the newly created file.

2019-01-23_09-59-53.gif

0 Kudos
Message 12 of 16
(1,186 Views)

Yes, I've been running my own Demo, which now (on my "new and improved system" doesn't run.  Fortunately, I've got a VM with "old Office" at home that I'll try this evening.  It's hard enough keeping up with (incremental) changes in LabVIEW, but when Windows and Office are also "moving targets" ...  I feel sorry for the LabVIEW Developers at NI.

 

Bob Schor

0 Kudos
Message 13 of 16
(1,178 Views)

Dear Gregoryj,

with a similar code I got the desired result. So I'm satisfied with the VI. Now I will make it a little bit better following the hints of Bob. Thanks a lot.

0 Kudos
Message 14 of 16
(1,140 Views)

Dear Bob, thank you for your long and patient answer. I will try to make a new VI with the suggestions you gave me.

Just one point, because I realized that the program was poorly commented.. The instrument which is connected starts a measurement only when the user physically press a button on it. It is a contact-like measurement of a certain object and it is desirable to see (as a table indicator) the N-values. So, if I have to analyze let's say 100 objects, and each object has to be evaluated N=3 times, the table will end up with 100 rows and 3 columns. Please look at the short video that I made, attached to the message. The maximum number of repetition is 8, that's why the table is so wide in the front panel.

 

 

0 Kudos
Message 15 of 16
(1,137 Views)
Solution
Accepted by topic author zazza

I have no problem with your collection of data.  What I was suggesting is that your code suggests that you do the following:

  1. Collect data in a loop, repeating until some condition is satisfied (such as pushing the Stop button).
  2. When the collection is completed, all the data are written to a file as a "single operation" (meaning the data are gathered, the file is opened, the data are written, and the file is closed, with no other operations "interrupting" the flow of data).

Step 2 takes place entirely when Step 1 finishes.  This means that Step 2 logically belongs outside, and after the Loop that characterizes Step 1.  Among other things, by "separating the functions" in this way, your code will become simpler, easier to understand, and easier to "explain to others" (and to remember, six months later, what you were trying to do).

 

Bob Schor

0 Kudos
Message 16 of 16
(1,117 Views)