ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Pocket Excel with LabVIEW PDA Module

Greetings,

I am very new to LabVIEW and I was wondering if it was possible to
retrieve information from a Pocket Excel file using LabVIEW PDA
module.  I couldn't find any "Read from Excel" VI on LabVIEW PDA
Module so this is the nature of my question.

I have a 1xn array of RFID tag IDs (scanned from RFID reader).  I also
have a database (in Pocket Excel, see attached) that contains the information of the
RFID tag IDs within the 1xn array.  I am attaching an Excel file that
illustrates our database.

For example, if I have an array of: [1234, 1256, 1265], I would like
LabVIEW to look at the first element, 1234, search for it in Excel,
retrieve the information, "Jerry," "A-," and "Lab," then display  it.
I would like to also add a time stamp when this retrieval is done.

Next, I will want LabVIEW to look at the number 1256, search the Excel file and find
"Joe," "AB," and "Patient's Room."  I would like this information to
be placed in a table in LabVIEW's Front Panel.

I know I should use a while loop using Auto-Indexing, but have no clue
as to how I could do this

I will appreciate ANY HELP!  🙂

Thank you!
-Amal
Amal Patel
0 Kudos
Message 1 of 11
(12,566 Views)
A simple search for "excel" and "PDA" would have brought you to this recent thread. That should probably be enough to help you.

___________________
Try to take over the world!
Message 2 of 11
(12,553 Views)
When I ran the Search 2D Array.vi you created in the thread you linked me to above, on my PocketPC, it gave me errors.  I think it gave me errors because Excel is NOT available on the PocketPC.  The only spreadsheet program available on the Pocket PC is Pocket Excel.  Is there a workaround this?
Amal Patel
0 Kudos
Message 3 of 11
(12,518 Views)

Did you read the entire thread?

LV does not support ActiveX on the PDA, so you need to save the file as a CSV file. Read the entire thread.


___________________
Try to take over the world!
0 Kudos
Message 4 of 11
(12,493 Views)
Greetings 🙂
 
Yes, I did read the entire thread.  The problem is I am not being prompted on the PDA to open a file.  I know I'm supposed to have a *.csv on the file.  I modified your code from Search 2D Array.vi, and I got errors when I ran it on the PDA.  It says, "App failed.  Error code 160981006.  Bad input argument to function."   I attaching your modified VI.
 
Thanks 🙂
 
Amal Patel
0 Kudos
Message 5 of 11
(12,449 Views)

"Bad input argument to function" - My guess is that the PDA module simply has a different behaviour on this than the PC - when using the read function without a path input, it takes an invalid path instead of showing a dialog asking you to find the file. The solution is to wire the path to the file into the function (either by showing a dialog, if possible, or by obtaining the path through other means).

In any case, you should be aware that this was only a very quick example meant to show the searching code. It was not meant to be taken as is and used in real code.


___________________
Try to take over the world!
0 Kudos
Message 6 of 11
(12,435 Views)
That's too bad!  I am very new to LabVIEW, and do not know how to prompt the user to enter a file path.  Is there a VI that can do this for me?  I am sooo desperate. 
 
Thank you Smiley Very Happy
Amal Patel
0 Kudos
Message 7 of 11
(12,432 Views)
 

To know if there is a VI that does this, the easiest thing is to look at all the VIs in the file palette. 
You should find it under the surprising name "File Dialog", but I don't know if it's supported in the PDA module.

To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here, here, here, here and here are a few you can start with and here are some tutorial videos. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).


___________________
Try to take over the world!
0 Kudos
Message 8 of 11
(12,424 Views)

Well I fixed it.  Thank you for your help.  I only had to put a while-loop around your code and use a Read from Text VI, instead of Read from Spreadsheet VI.

I'm attaching my modified code below, if anyone else needs it in the future.

Amal Patel
Message 9 of 11
(12,345 Views)

Muchas gracias por el Ejemplo... me sirvió bastante.

 

Aquí les adjunto un complemento que desarrolle, para insertar o cambiar un registro del arreglo y volverlo escribir en el archivo plano sin añadir un nuevo registro.

 

Ojalá sea de utilidad para alguien.

 

Saludos.

 

Nito

 

0 Kudos
Message 10 of 11
(4,208 Views)