LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -2146777998 Unkown System

Hi,

I can't get my head around this specific error. If i start the vi as is I reieve no error however when I add a new cell that I would like the vi to read and return the value I get this error "Error -2146777998 Unkown System" However, if I undo all the changes that I did in order to get the a second cell to be read I still recieve the error. I have to close labview start it again and then it will give me a value. I have attached the vi I hope someone can help me with this I have gone to excel board but I was told that I posted in the wrong section so I am posting here.


Thanks.
0 Kudos
Message 1 of 11
(6,621 Views)
What exactly are you doing to "add a new cell"? Are you adding second control to wire to the "Cell2" parameter of the Range method? If so you need to change the datatype for the variant conversion to use a 2D array:





The specific error that you're getting is most likely due to an orphaned Excel process that never got closed. Open up your Task Manager and see if there's an Excel process still running when Excel is not open. If so, terminate it.


Message Edited by smercurio_fc on 06-06-2008 03:36 PM
Message 2 of 11
(6,607 Views)
Thank you thats what I am doing I will try to close the ref. Also is it possible to get more than 2 cells? I can only seem to get to cells while I am still having the above problem bc I havent had time to throughly try what you have suggested.
0 Kudos
Message 3 of 11
(6,603 Views)
The number of cells is completely defined by the range, which is specified by the values of Cell1 and Cell2. Cell1 indicates the start of the range, and Cell2 indicates the end of the range. These two can be different rows and/or columns. So, if Cell1=A1 and Cell2=A3 you will get 3 cells, while if Cell1=A1 and Cell2=B3 you will get 6 cells.
0 Kudos
Message 4 of 11
(6,598 Views)
I see well I only want one value basically...



I need to get values from a specific cell which will return a value which I will then have labview load into a instrument that will set frequency etc. But I need to get values for A1 A2 and so on. But i want the individual values for the cells...I have a template that reads the ENTIRE page and returns all the cells but I do not know how to grab a single value from a specific cell which the user can choose that the user may define.

I have attached the other template for you. This vi was not done by me I only know the initials of the author which is "FG"


Message Edited by MrSafe on 06-06-2008 05:07 PM
0 Kudos
Message 5 of 11
(6,596 Views)
It seems that VI simply returns a 2D array of variants. I have no idea why since the subVI is not included. What I showed you was how to get back a 2D array. You can pick off any element out of this 2D array using the Index Array function.
0 Kudos
Message 6 of 11
(6,592 Views)
i see i didn't see the change that you posted I assumed it was the same sorry im lacking labview experiance 🙂 could you please give me an example of an array index function? I have never seen it being used.
0 Kudos
Message 7 of 11
(6,587 Views)
The modication I showed you was to read in a range of cells as a 2D array of strings. If your cell values are all numeric then you can make the 2D array of strings constant to be a 2D array of numbers. Since I have no idea what is in your Excel file, the 2D array of string was the "safest" conversion.

The Index Array will allow you to pick off a specific element if you wire both the row and column. Refer to the LabVIEW Help for more information on that function.



To learn more about LabVIEW it is recommended that you go through the tutorial(s) and look over the material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.


Message Edited by smercurio_fc on 06-09-2008 09:24 AM
0 Kudos
Message 8 of 11
(6,554 Views)
hmmm..I cant seem to find the row and colum icons you are using.
 
 
 
 
*UPDATE* Just saw your links thank you.


Message Edited by MrSafe on 06-09-2008 11:16 AM
0 Kudos
Message 9 of 11
(6,545 Views)
any idea on how to save information to an excel file?
0 Kudos
Message 10 of 11
(6,531 Views)