12-05-2006 08:34 AM
12-05-2006 09:01 AM - edited 12-05-2006 09:01 AM
Message Edited by JoeLabView on 12-05-2006 10:09 AM
12-05-2006 09:18 AM
12-05-2006 02:03 PM
Thanks ravis,
Your information is good; however, it is not quite what I am looking for.
Can references to an Excel worksheet be used (shared) among vi's.. More to the point: If you open a spreadsheet reference in one vi, then share that reference to be used by another vi, should it point to the same object (ie Cell, Worksheet, etc)?
I am using LV7.1 and seeing something bizzare when sharing a reference to a cell.
A Main VI creates a spreadsheet by using a sub-vi. It basically creates a template.
The test vi sets values within 2 worksheets. One holds values which points to where active data is being written to in another worksheet. Remember that each test has its own worksheet.
In the test VI, there is a vi which obtains the value to where data is written to in the worksheet. Another vi increments this va;ue to point to the next row. BOTH of these vi's share the same reference to a CELL within a tracker worksheet. Well, when writing the value to the cell, it places the new value in the wrong location. In a location that doesn't make sense. So, I gave up on the Cell reference idea and implemented a solution which points to the worksheet and from it I select the cell. The value does not change!!! As a matter of fact, there are no errors generated and nowhere in the worksheet do I find the newly written value... (I have probes all over the place within all the vi's concerned). The value does make it to the Range>Value Property Node. And this same implementation works elsewhere...
... with one tiny exception...
Where it works is when the worksheet is opened and does not use a previously used reference... So is it my imagination or can references be re-used?? Oh and by the way, the main vi is calling the test vi in a loop, so it's references are still active (ie temperature tests).
???? confused ???? 😮 😮 😮
-sigh-
RayR
12-05-2006 02:32 PM
D'OH!!!
I may have found the culprit...
I was using the Invoke Node > Reinitialize All to Default <... It re-initialized the refrences!!! D'OH!!!! 😮 😮 😮 😮
(I hope there some coffee left ... I obviously need some) 😉
😄
12-05-2006 03:38 PM
12-11-2006 09:02 AM