LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I read data from a spreadsheet to simulate a memory map?

I have a spreadsheet that is basically a memory map.

I need to find a way to access the contents of the excel sheet depending on a user defined input.

For example...say that I have an excell with data as follows:


Input Row Output Row 1 Output Row 2
0 00 00
1 00 1F
2 03 02
3 0F 03

If a user enters 1, then I need to access the data only in the Output Rows corresponding with that input. Then I have to output the data in the two corresponding output rows.

The data could be saved as a txt
spreadsheet if need be, but I already have it in excel.

I am currently developing in 6.i, but I will have 6.1 in a couple of weeks.

If anyone has any examples or tips, it would be appreciated.
0 Kudos
Message 1 of 2
(2,806 Views)
Hi,
as far as I've understood the problem is how to get some data from 2D array.
As you shown in your example the rows are actually columns (because they are vertical :-));

If input column is always equal to its index (I mean 1,2,3 ...) then all you need is to extract data from all other columns at specified row.
You can do it easily with "Index Array.vi" from array palette. Just wire your 2D array to this VI and wire the number of row you want to extract to its corresponding input node.

If you have problems with reading of txt spreasheets you may use "Functions -> File I/O -> Read From Spreadsheet File.vi"

The example is attached.

Good luck.

Oleg Chutko.
0 Kudos
Message 2 of 2
(2,806 Views)