LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to enter numeric values into excel sheet and how to select a particular element from excel sheet?

Which is why I suggested to the OP, that appending data would be the "best" approach, i.e. make it easier for him especially if he stays in the text domain as you suggested and write to *.csv files .  Smiley Happy

0 Kudos
Message 11 of 27
(1,299 Views)

Now with the attached VI, Excel.vi I am able to write the numeric data into the Excel sheet and with the help of index array can select any particular element display it on the front panel or use it somewhere else.

What I want to do is when I enter a new value in the numeric controller it should not replace the old data rather the old data should move down and the newest data should be at the beginning of the Same Excel Sheet.

0 Kudos
Message 12 of 27
(1,289 Views)

What in the world possessed you to use the Merge Signals function on the 3 numbers, thereby getting dynamic data, and then needing to convert the dynamic data to an array? Smiley Surprised

 

Just use a Build Array function!

 

As to your question: I would suggest looking at the Excel Insert Cells function.

 

Also, you need to place latching Boolean controls inside the event cases so that LabVIEW will reset their state after reading the value. You did that for the Stop button, but not for the Submit button.

0 Kudos
Message 13 of 27
(1,280 Views)

Nope it is still not pre-pending the data.

Still the new data replaces the old data

0 Kudos
Message 14 of 27
(1,263 Views)

Post your code.

0 Kudos
Message 15 of 27
(1,249 Views)

I have attached the code.

0 Kudos
Message 16 of 27
(1,240 Views)

I saw your VI:

  1. Open the Excel workbook.
  2. Add the 3 values to the first row.
  3. Insert a new row at the beginning.
  4. End.

It's doing exactly what you told it to do. What exactly did you expect it to do? If you want to prepend the data then you obviously have to insert the row before you enter the data. We haven't invented time travel yet so you'll just have to do things in the right order.

 

Also, do not hard-code paths in the code. That is poor programming practice. Provide a path control on the front panel.

0 Kudos
Message 17 of 27
(1,231 Views)

Okay sir thanks a lot for your time and patience.

I will try and let you know.Smiley Happy

0 Kudos
Message 18 of 27
(1,225 Views)

Hello Sir,

I have attached a VI can you please tell me if I have done it correctly?

And, Now is there any way to check if the submit button is pressed so it generates 1 in excel at position Row 0 column 0?

0 Kudos
Message 19 of 27
(1,220 Views)

I have attached a VI. The data can be appended into the excel sheet but here I want the data to be entered at a specific position

When I press submit 1 button data should be entered from (0,0) to (5,5).

And, when submit 2 button is pressed data to be entered from (6,0) to (10,5).

0 Kudos
Message 20 of 27
(1,182 Views)