LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Load excel data on worksheet

Solved!
Go to solution

Hello, Is there any way to show the filtered information from an excel file in a table? I have an excel file, and I want my VI to show the names and the amount of money depending on a special character (asset). For example, I want to see those elements that belong to asset 2030. The problem I have is that my document has more than one worksheet, in this case it is the worksheet number two, and the information begins in row 5 and column 2. So I don't know how to search for the information when there is more than 1 worksheet and when it doesn't start in the first row and column. Can someone help me? 

 

Mocte117_1-1690074325348.png

Mocte117_0-1690074267693.png

 

0 Kudos
Message 1 of 3
(1,002 Views)
Solution
Accepted by topic author Mocte117

How to Read Data From Different Worksheets on Excel with LabVIEW ? is exactly what you need. It still works even if the table does not start at row 1 and column 1.

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 2 of 3
(961 Views)

Some additional notes to the Demo suggested by @ZYOng.

  • Note the avoidance of the "Easy Excel" functions and using the corresponding "specific" functions in the sub-Folder "Excel General".
  • You can write a small sub-VI to return an Array of all of the WorkSheet names to allow you to select a WorkSheet by its name rather than its number.
    • The function "Excel Workbook Properties" gives you both the "worksheet count" and "current worksheet name".  So you can write a For Loop using the Worksheet Count as "N", using the Index ("i") as an argument to "Get Worksheet", and using (again) "Excel Workbook Properties" to extract the "current worksheet name", saving it as an output Indexing Tunnel.
    • Now that you know the names of the Worksheets, you can use the appropriate WorkSheet Name as an input to "Excel Get Worksheet" (it's a String input wired on a "bottom" terminal -- look at the Detailed Help).
  • There are a pair of functions on the "Excel Advanced" sub-Palette that help you go between LabVIEW row, column notation (with zero offset, rows being a "Y" coordinate and columns being "X") and Excel notation (R/C, rows being "A", "B", "C" and columns being "1", "2", "3").  I wrote a pair of VIs to "translate" indices from LabVIEW Row/Column notation (2D Array of integer) to Excel "A1" (string) notation, and vice versa.

Hope these suggestions help you.

 

Bob Schor

0 Kudos
Message 3 of 3
(945 Views)