05-19-2016 06:34 PM
Hi, I want to do a Vi that reads the content in the cells of an Excel document while I'm editing it, I mean that I want to fill the cells with numbers and while I'm doing it labview is making a comparison to determine what to do depending of its content.
I want to know if is it possible to read the excel file while I'm editing it
if is it possible may you give me an example?
sorry for my english, but i didn't get an answer in the spanish forum
Solved! Go to Solution.
05-19-2016 06:49 PM
I am curious why you want to do this. LabVIEW makes it so easy to create your user interface along with your code, so why are you using Excel as your UI? Anyway, I've cooked up a small example for you.
Here is an example of reading cell A1 every 250ms. You can change wait time, data type, etc. to meet your needs.
05-19-2016 07:21 PM
well, I'm going to pack blinds
I must use a barcode scanner to show to the employee the quantity of parts and pitures of the parts that he must put in box of the blind, every blind is different, because they are for custom windows. so I need to separate them by characteristics and family to determinate the parts that I must pack, like screws and supports, etc. and do a barcode sticker with the number of the family and characteristics. then when someone is going to pack it :
1- scan the barcode sticker with the scanner
2- send by python the bardcode number divided in parts to excel cells
3-labview pick the numers of the the cells and make a comparison of the characteristics and family.
4- labview displays pictures of the pieces and quantity.
5- the empleoyee push a button and send the next number that is in the next cell, and labview make another comparison to display the next part
that´s the way that I think that I can do it, but I'm still not sure if it is the easiest way to do it, but I MUST use the barcode scanner and display the picture, then the empleoyee must push the button and display the next picture, that´s the way that he will never miss a part.
thank you
05-20-2016 02:40 AM
Hi Alexis,
1- scan the barcode sticker with the scanner
2- send by python the bardcode number divided in parts to excel cells
3-labview pick the numers of the the cells and make a comparison of the characteristics and family.
Why don't you replace those 3 steps by:
1- LabVIEW reads the barcode scanner output and analyzes the barcode as needed
No need to use Python and Excel…
Btw. as long as you don't save the current Excel sheet you cannot scan the excel xls(x) file for changes. Your only option then would be to use ActiveX Excel automation to check the current state of specific cells/ranges…
05-20-2016 11:20 AM
Do you know how can I divide the string that I'm going to get from the scanner?
I think that the scanner works like a keyboard, it will give me a number, for example : 1002103478
10(fts)
02(inches)
10(screws)
34(the number of the colour)
78(the number of the wood)
I want to know if I can divide the number in parts 10-02-10-34-78 for example, and put the parts in an array to work with it, if I could I will not use python or excel anymore
thank you.
05-20-2016 11:37 AM
Of course you can parse the data however you like.
05-20-2016 11:54 AM
thank you, can you send me the source of the picture? or tell me the names of the palettes? it would help me a lot
05-20-2016 12:06 PM
Sure thing. It is a VI snippet (you can tell by the outline and the LabVIEW version above it) so you can save the picture, and then drag it to your block diagram to turn it into code. If you have older than LV 2014 though, I added the labels in there.
05-20-2016 12:28 PM
thank you, I didn't know it, I'm a noob in labview, there is a lot to learn, you helped me a lot
05-20-2016 12:41 PM
Sure thing. It actually took me about 2 years before I enjoyed graphical programming. Part of the barrier was that it seems so easy to get started and wire stuff up, that we don't approach it like a traditional programming language, where you might take a college course or read a 300 page book before you start developing real-world applications. If your company got the software subscription (SSP) you have access to a LOT of training videos online that I would recommend. And while not as fun as the videos, there are some good tutorials you can find links for on the right-hand side of the forums.