06-23-2014 03:27 AM
Hi there,
I want to read multiple sheets from an excel workbook and create a 2D array from this data to create a graph containing all measured data in the workbook. I can't get this working, I tried things from connecting the graph directly to the 'Excel Get Data' to building an array to inserting into new array, nothing seems to work. I hope someone here can help me. A screenshot is below:
Solved! Go to Solution.
06-23-2014 05:46 AM
Hi,
I found this example:
http://www.ni.com/example/28409/en/
Another example is attached. I think the attached example could serve as an inspiration.
Hope this helps!
Simyfren
06-23-2014 05:50 AM
Sorry,
attached file here
Simyfren
06-23-2014 06:04 AM - edited 06-23-2014 06:06 AM
Thanks for your reply, but reading the excel sheets is not the problem. It gives me a 3D array with a page for every sheet, I need to convert this to 2D array so I can display it through a graph or chart and that's the point where I get stuck on..
*I'm using the Report Generation Toolkit to write and read excel files.
06-23-2014 06:19 AM
HI,
try to use array function from programming palette. I think Index array function should help.
Simyfren
06-23-2014 07:14 AM
I've already tried using Insert Into Array and Build Array, but I can't get it working with both of them.
06-23-2014 10:42 AM
06-23-2014 03:13 PM
Hi,
I don't know you data structure correctly. But as Michael Munroe said, the way is tu put 3D array into for loop, then you have 2D array. Then if you index 2D pole, first element should be X channel, second element should be Y channel (but as I said I don't know your data structure precisely).
Simyfren
06-24-2014 03:56 AM
I've tried using a for loop too, but when I use the 'Insert into Array' function it gives me an error.. I really don't know any other options
06-24-2014 04:07 AM
First I thought I understand your problem until I read that you use the insert into array function.
Maybe you should give us a little bit more information of what u like to do.
Do you want to show the 2D array in a Graph or add new elements to the array or just get rid of the third dimension...?
Regards,
CMW