LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

get sheets name of excel file

Solved!
Go to solution

Hi 

you will find attached the Principal VI " Read excel file" and also " read excel prb " when i tried to call the Vi in the main in 15.0 LV version.

Download All
0 Kudos
Message 21 of 31
(821 Views)

Why do you need a calling VI (Main VI), Which does nothing other than providing Input and Expecting Output (No Explicit Function),

Learn about Property Node (Implicit/Explicit) for updating values in calling VI from sub VI.

Frame your algorithm in such way that "OK" will be triggered from calling VI.

 

I Personally Feel, you need to learn LabVIEW Basics.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 22 of 31
(816 Views)

Understand how State Machine Works and Implement your Algorithm using LV StateMachine.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 23 of 31
(815 Views)

@Student_LV wrote:

Please does anyone understand the reason why i get nothing in return ?  


I believe I know why your routine fails when called as a sub-VI.  In my earlier responses to this thread, I repeatedly asked if you had access to the Report Generation Toolkit, and have yet to see a reply to this question.  Please answer my question -- do you have the Report Generation Toolkit?  [Or, alternatively, do you see a Report Generation Palette when you right-click on your Block Diagram?].

 

Bob Schor

0 Kudos
Message 24 of 31
(813 Views)

In the main Vi , i will put sub VI i had already done to treat data such as ''mean'', extract specific data from the hole sheet, and many other functions.. So I need to call the VI which read excel data to get the content of each sheet

My problem was how to trigger  " select sheet " and "ok button" from the main VI, because they are included into a while loop in the original VI, so their values are not updated in the main and I couldn't create a sub VI from a selection because the while loop containes two controls  

It's true that i'm new to labview, i'm doing my best to learn a lot of things each day. I had already framed my algorithm and i learned about state machines, but As long as I posted my problem in the forum , it's that i didn't find a solution my own and wanted a hint or a starting point to solve it

0 Kudos
Message 25 of 31
(813 Views)

hi Bob Schor

I don't have Report Generation Toolkit, I posted My VI to read excel data using activex functions 

0 Kudos
Message 26 of 31
(812 Views)

Make Two separate Modules (1.Getting Sheet names, 2. Reading Values of Selected Sheet).

Initially Call Getting Sheet names Module and Display the Sheet Names using Explicit Property Node to get Displayed in Main VI.

Use User Event Function for Triggering Read Values of Selected Sheet. (To Detect the Trigger Function use Event Structure in the subVI with Dynamic Events enabled)

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
Message 27 of 31
(807 Views)

Thanks.  I believe the problem arises from using "non-standard" Connector Panes (the default, and Standard, is the 4-2-2-4 pattern).  If you had used the Standard, you would have Error In, Error Out, and might have noticed that you need to bring in some References (to Excel, for instance) that are currently unwired, hence take their default values, probably "Not a Reference".

 

See if passing these references in from the Caller fixes things (I'll wager a dime that it does).

 

Bob Schor

Message 28 of 31
(792 Views)

 I thank you so much for your suggestion 

1- I did the first module " get sheets names ", (attached below ), but same thing when i call it in the main VI, i don't get list name however alone i get it, which property node to use other than the ones that i've used ?

2- For the second module " Read Values of Selected Sheet ", I didn't understand very well how to do it using the event structure , can you please explain to me more or any example could help

Thank you very much

0 Kudos
Message 29 of 31
(789 Views)

@Student_LVI am Still using LV 2015 So i am not able to VIEW Your Module But still with the understanding i will give my suggestion

 wrote:

1- I did the first module " get sheets names ", (attached below ), but same thing when i call it in the main VI, i don't get list name however alone i get it, which property node to use other than the ones that i've used ?

 

Are you aware of Implict and Explicit Property Node (Calling Property node via Reference of Control/Indicators), which will help you to update Main VI from subVI

 

2- For the second module " Read Values of Selected Sheet ", I didn't understand very well how to do it using the event structure , can you please explain to me more or any example could help

 Study about basic Event Structures and how it works, then to trigger the event from outside of the VI You need to use User event and need to call the same in Event Structure.


Its Quite simple to provide you an ultimate solution, which you are expecting but still you need to do by your own

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 30 of 31
(784 Views)