LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MS Office Report Express VI and Array Problem

Solved!
Go to solution

Hello all,

 

I have a strange issue with the MS Office Report VI that's included with the Report Generation Toolkit. I created an Excel template which I linked using the "Custom template for Excel" preference and applied all the named ranges. However, two of the named ranges that I am inputting are 1D Arrays of doubles. Now the problem:

 

When I input the arrays to their specific name range (it's only 6 values), instead of inputting just the array values into the cells, it inputs like this:

 

0    Value

1    Value

2    Value

...

6    Value

 

It pushes the "Value" to the column next to the name range because of the 0-6.

 

It does this with both arrays so it screws up all the formulas. Any one know how to remove the 0-6 and just input the values?

 

Thanks all 

0 Kudos
Message 1 of 16
(4,721 Views)

I don't know if this will help, but I'm passing data through a state machine using shift registers. When it's time to add an element to the array, I use the "Build array" function in the state that takes data. All the data is there, but the Index number (0-6) is being included in the report. 

0 Kudos
Message 2 of 16
(4,709 Views)

It would be better if you can show the code (2009 version please)

-----

The best solution is the one you find it by yourself
0 Kudos
Message 3 of 16
(4,696 Views)
Will do on Monday. I was hoping it was a common issue since it's nothing fancy, just a 1d array into the express VI. I'm glad it happened now during the evaluation!
0 Kudos
Message 4 of 16
(4,689 Views)

I may be wrong but I think it is because of the way this express vi deal with array. One of its subVI use a Convert to DDT node which add a "channel" value to the rows of an array. If the case, to avoid this you will have to use the Excel specific VIs of the Report Generation Toolkit or if you don't have the toolkit to use ActiveX.

 

Ben64 

0 Kudos
Message 5 of 16
(4,682 Views)

Looks like you're right Ben. If you run the code, it pastes 0-5 then 1-6. Is there no other way around this other than using the Excel specific VIs or ActiveX? It's so easy/convenient just using this express VI.

 

Report.png

0 Kudos
Message 6 of 16
(4,663 Views)
Solution
Accepted by buickgn

The Express VI are easy and convenient but at some cost. Since the Express VI can also accept a waveform input you have the accept that it will add a channel name.

 

With the Report Generation Toolkit (which also have its limitations) it is easy to add only the data as you want:

 

Using Named Range with RGT_BD.png

 

Ben64

Message 7 of 16
(4,653 Views)

Sounds good, thanks Ben!

0 Kudos
Message 8 of 16
(4,651 Views)

Greetings, I wrote a program that generates an array of data and stores a data table, just as a chart, just starting to program, I hope that my program can be useful

 

Message 9 of 16
(4,542 Views)

I add the program to read a report from excel

Message 10 of 16
(4,539 Views)