LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read, Edit, Update Excel Via User Friendly Application created by labview

I am looking for some LabVIEW help. I’m still learning. I’m looking to create a LabVIEW control based on the attached spreadsheet and would like some guidance on the easiest way to attack it.

Goals: take information from excel/Excel online into LabVIEW. allow the user (regardless of location) to select the employees name (via drop box/search) then select a function to edit via drop box (points, position, and active employee) once that’s selected, I would like to edit and update that value based on the below:

Drop down selection

(Points)

*text* (+1)

*text* (+2)

*text* (+5)

*text* (+10)

*text* (+12)

*text* (+20)

*text* (+X)

*text* (-X)

 

Drop down selection

(Position)

"first"

"second"

"third"

"fourth"

"fifth"

 

Active employee?

Yes or No

 

I’m not looking for someone to do it for me as I want to learn how to do it. some guidance, explanation or examples would be awesome! I understand it’s not lab views primary use. however, I would like to create something that can be used while I learn some of the various functions of the program!

0 Kudos
Message 1 of 3
(2,144 Views)

This can be done using the Report Generation Toolkit (I've done it), but I'd say it is not a "beginner's Project".  The RGT, as its name states, is a Report Generation Toolkit, meant for writing formatted Reports in Excel.  There's a not-so-bad example/Demo of this here.

 

What you want to do, however, involves both reading an existing Excel Spreadsheet, parsing the Sheet to identify such things as Row and Column labels (so you can search), and manipulating the data.  It also matters if you want to do this with the spreadsheet open (say, on another monitor) and to see the changes in Excel as you make them, or just make each change (to the data), and rewrite the Excel file when the program exits.

 

In my case, I generally start with an "empty" Excel Template, having the Column headers in place, and having otherwise empty rows.  I generally write a "row at a time", but depending on the situation, might not write every column for every row (but I know, for each row, what data need to be filled in).  Most of the time, I write successive rows, but there is additional code to allow me to "overwrite Run 34".

 

To get started, and to begin to learn how to do what I think you want to do, I'd recommend the "Read Everything, Parse Everything, Update Everything, then Rewrite Everything" method, with the Excel spreadsheet not visible.  Here's what I mean:

  1. Open Excel File.
  2. Read Row 1 as Text, save in array "Header".
  3. Read remaining Rows as 2D Array, "Data".
  4. Allow user to select Employee.
  5. Allow update of Points (I'd start with simple display of current Points, allow/force entry of new Value -- you can add the options "+1", "-1", "+10", etc. later once everything else works).
  6. Allow update of Position (I recommend you make this an Enum, and I think "First" looks better than "first").
  7. Allow user to change Active Employee.
  8. When done, choose "Do More" or "Exit".  If Do More, go to Step 4, otherwise go to Step 9.
  9. Rewrite (starting from Row 2) the 2D Array Data, Save Report to File, and Dispose Report (which closes Excel).

Bob Schor

0 Kudos
Message 2 of 3
(2,071 Views)

Bob,

Thank you very much for the advice! I will see what i can come up with!!

0 Kudos
Message 3 of 3
(2,057 Views)