LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel 2010 and labview 2010

Solved!
Go to solution

Myke,

 

Great to hear that it worked out for you, and best of luck with 2010. 

 

Regards,

 

Kyle Mozdzyn

Applications Engineering

National Instruments

Regards,

Kyle M.
Applications Engineering
National Instruments
Message 11 of 17
(1,476 Views)

OK.......... New problem.

I am now using a datataker 85-2 and 11 CEM expansion modules. I can export to a CSV file but when it does it generates the data in a single line from cell D2 to PK2. Despite my efforts to hard code the datataker, I cannot get it to give me my data in blocks. There has got to be a way and I'm sure there is and trying it out over the last day or so, I can't seem to get it. I'm posting a piece of my code and the data sheet (it's good, bad data, if that makes any sense) to try to brainstorm with whoever responds. I've tried several things so far to no avail. The first "block" I need to retrieve is D2:HS2 which is 224 points of data on insert it into a 16 x 14 array. The total points of data I'm getting is 424 t'couples in about 30 seconds. Once that gets done I can figure out the rest.

 

Thanks in advance

Myke

 

Download All
0 Kudos
Message 12 of 17
(1,311 Views)

Out of curiosity, what value are you putting in for Floor Temp Coordinates?

Ravi A.
National Instruments | Applications Engineer
0 Kudos
Message 13 of 17
(1,299 Views)

Ravi,

I am using D2:HS2 for my coordinates. Not sure if this is the right format or if I need to create a separate string control, but it seemed to work with the "stacking" sheet that was posted earlier in this topic. Granted, that sheet was set up with "blocks" of data that matched my control, but I thought that this may work the same way. Only after we got the datataker did I find that I couldn't code it to export the data in a specific format and/or "shape".

What is happening when I put this in is element 1 is filling only the top line and the rest of the array is blank. I've tried to use 2 for loops and putting a 2d array of string on the variant to data, but that opens the array but no values and ends with an unspecified error.

0 Kudos
Message 14 of 17
(1,290 Views)

If you're getting all the data in the top line, you might need to just rearrange the incoming array to structure it how you need it (in that 16x14 size).

It seems you can use the Reshape Array function to accomplish this.

 

Go to the Functions Pallette and navigate to Programming >> Array >> Reshape Array. You feed your array into the top parameter, and then specify the size of each of the other dimensions (16 and 14), and you'll get a reshaped array.

Ravi A.
National Instruments | Applications Engineer
0 Kudos
Message 15 of 17
(1,281 Views)

Ravi,

I had tried to use a reshape array once before, but like a boob I didn't wire in a 2d string array constant. It works pretty good now. I apologize for not uploading my actual program. What I eventually had to do was since I need the data in another .vi is created a local variable to put my data in. My only other question is this: Couldn't I use the excel report generation to do the same thing? I've been thinking that somehow I need to skip a few cells, wite some data, skip some, and so on.

 

Thank you very much for your help so far. I'm using things that I haven't used yet so I'm unfamiliar with them.

0 Kudos
Message 16 of 17
(1,261 Views)

here is an example of what my data needs to look like.

If I could get close, that would be good, and not sure if you can skip around like that.

 

0 Kudos
Message 17 of 17
(1,252 Views)