02-25-2017 03:30 PM
I have the following VI that places a data table and 3 plots on the same Excel worksheet. Then I added Excel Get Worksheet.vi in an an attempt to place the table in Sheet1 and the 3 plots in Sheet2. However I get "Invalid Excel name ranges" error.
I need help with two things:
1. How do I export data into one worksheet and generate the plots on a different worksheet (within the same workbook)?
2. How do I make the legend appear on top of the plot area for all three plots and not just for the first plot as my code does?
Solved! Go to Solution.
02-25-2017 05:24 PM - edited 02-25-2017 05:25 PM
The index is use to select the OLE object (your graph here). This index start at 1 for the ActiveX properties and methods (in the report generation toolkit it starts at 0). Leaving this index at 1 you are setting 3 times the position of the first graph.
Use the index terminal value +1 to select the graph. I don't know about the invalid named range as I don't get this error. You didn't specify which fonction is generating this error.
edit: does your workbook opens with at least 2 worksheets?
Ben64
02-25-2017 06:01 PM
No, the code does not open with two sheets. That is the first thing that I checked.
How about the problem of the legend? On the first plot shows the legend where I want it, which is top. Why do the other two plots show the legend on the right (which I guess is the default location)?
02-25-2017 07:34 PM
I figured out the first problem. Now, all I need is why the legend does not appear on the top for the second and third plot.
02-25-2017 07:57 PM
02-25-2017 08:13 PM
Thank you! I accepted your answer as a solution. I added 1 to the for loop index and wired the result into the index under Worksheet: Invoke Methods: OLEObjects. This took care of the legend issue.