LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Report Generation tool, Excel Specific

Reprot Genertation tool kit for excel seems to do the hard stuff right but can't do the easy stuff.

I'm trying to plot xy graph with multiple series in excel spreadsheet. Somehow I can't let LV to take multiple X series. It can graph XY graph using "insert graph.vi as long as X remains same for all Y series. Could any one know how to do this?

Also, how do I label my X and Y axis? The tool kit sure get fancy with fonts and colors but can anyone tell me how to label my axis!
0 Kudos
Message 1 of 14
(3,771 Views)
In your case, it is easier to use Excel macro to plot the graph and label the titles. It should be easy if you know some VBA.
0 Kudos
Message 2 of 14
(3,771 Views)
Thanks for your helf Joe.

Unfortunately, I don't know much about VBA. Also, the length of measurement captured on X and Y series depends on user. It can vary from user to user. The next X and Y series are appended. However, for each series the lengh of X and Y series are the same.

See the format below. X1.n and X2.n where n is same for both X and Y axis.


Series 1 X1.1 Y1.1
X1.2 Y1.2
. .
. .
X1.n Y1.nn

Series 2 X2.1 Y2.1
X2.2 Y2.2
. .
. .
X2.n
Y2.n
0 Kudos
Message 3 of 14
(3,771 Views)
the graph you need to create in Excel should be a x-y graph. LV Report Gen toolkit probably does not have such a function. Therefore using macro is probably the only way. If you can wait, I can help you out when I have enough time. But first, could you send me a sample Excel file with some example data, and also your preference of where the graph is going to locate (in the same worksheet as the data, or in a different workseet).
0 Kudos
Message 4 of 14
(3,771 Views)
Joe,

I've attached XL sample data file. Please read the note on the comment tab which explains in detail. As far as location of the graph, it really doesn't matter. As you can see in the file, I've already created a seperate worksheet for graph. I can place the graphs if I can just plot them right!

Again, thanks! I cetainly doesn't know how to do these so I could wait!

-CT
0 Kudos
Message 5 of 14
(3,771 Views)
Sorry for my late reply.

The example is attached below.

-Joe
0 Kudos
Message 6 of 14
(3,771 Views)
Joe,

First of all, thank you for writing "example.vi"!

Please consider me dumb but I just don't know where to provide the data. Perhaps, it is either because I'm so used to seeing data for most of graphs vi in Labview or not knowing anything about VBA.

I can make it out for label and all other stuff but have no clue on telling the micro where to read the data to be plotted!

Again, I thank you for your help!
-Chetna
0 Kudos
Message 7 of 14
(3,771 Views)
First of all, write the data as you did before. The example does not write the data, it just uses the existing data in Excel, so the data must be there before the macro executes.

The example has one particular input: Datasheet Name. This is the worksheet name where the data is located. If you can print out the VBA code (Open Excel, press Alt+F11 to excess it), the comment should be self-explantionary.

Joe
0 Kudos
Message 8 of 14
(3,771 Views)
Joe,

I inserted "example,vi" after "save report to file.vi" where all my excel data are stored.

I then ran my program and outputted data just like the datafile I had sent you w/11 points and 2 series. From your comment in the vi, it should have plotted the graph starting from row 57.

Somehow, it didn't graph. I put a break point on vi and stepped in but didn't see any problem.

Am I insterting the vi correctly. The datafile do have all data, which makes me wonder if it is getting the data or not!

Again, thanks a lot! This might be something simple, I'm not seeing it!

-Chetna
0 Kudos
Message 9 of 14
(3,771 Views)
If you have fixed number of X and Y axes you may just build a xl template and write your data to the appropriate columns.
0 Kudos
Message 10 of 14
(3,501 Views)