From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-01-2010 01:25 PM
I am trying to automate adding a graph to Excel. The Easy Graph.vi is too simple for what I would like to do.
I recorded a macro of what I wanted to do, and then I copied it in LabVIEW basically.
My program is erroring out every time I try to modify anything on the chart (title, series values, series names, etc).
I cannot figure out why it will allow me to add a sheet, add the chart, rename the sheet, and then error out when I continue to use the Excel._Chart properties and methods.
I attached a sample file and my code.
Thanks
09-01-2010 03:22 PM
Can you create the graph without error?
09-01-2010 03:24 PM
Here is an example of the chart wizzard that I help someone else with. It allows you to set up your graph titles and axis. I have never had to upgrade this feature from MS excel 2000 - 2007
http://forums.ni.com/t5/LabVIEW/labview-excel-2007-Axis-title/td-p/1226794
09-02-2010 10:50 AM
Ok, I figured out my issue.
It seems that you have to graph the data, before you can change any graph attributes, even though I have done that before.
Once I put the axis, title, etc after the graphing, then it worked. Well, I also had specified my range wrong, so that errored out too.
Thank you for the help.
Also, how to you get a reference to the Chart Wizard through the excel activex?
09-03-2010 07:06 AM
@Kenny K wrote:
Ok, I figured out my issue.
It seems that you have to graph the data, before you can change any graph attributes, even though I have done that before.
Once I put the axis, title, etc after the graphing, then it worked. Well, I also had specified my range wrong, so that errored out too.
Thank you for the help.
Also, how to you get a reference to the Chart Wizard through the excel activex?
I posted a snippet. You can take it from there. I do not remember how I got it before. I have not had to change it in six to seven years. I remember going through the MSDN and found the function. I think I made it from scratch to match the MSDN..