02-24-2015 09:12 AM
Hi All,
I'm trying to modify the series line weight of a chart on my excel sheet by using the property activex. I'm using the Graph.Chart object and the series property node return to me the error -2147352573. Where am I making mistake?
I'm using:
Labview 2014
Excel 2010
Windows 7
Thank you in advance.
Solved! Go to Solution.
02-24-2015 09:32 AM
@g_Ricky wrote:
I'm trying to modify the series line weight of a chart on my excel sheet by using the property activex. I'm using the Graph.Chart object and the series property node return to me the error -2147352573. Where am I making mistake?
You are using the good properties to change the line width but you are not using the appropriate object (Graph.Chart object). I'm guessing the Chart is embedded in a worksheet (not a chart sheet). In this case you need to use the Excel.ChartObject object (worksheet ChartObjects collection, index to get a ref to the ChartObject, convert to Excel.ChartObject, use a ChartObject property node to get a Chart reference).
Ben64
02-24-2015 10:47 AM
Thank you for the reply @ben64,
I used the Graph.Chart obj because it exposes a DataSheet table that it's invisible into you worksheet. You can do the same using the Excel.ChartObject but you must using a range and the ChartObject.SetDataSource method, this implicies that you select the data insert into rows and columns from the worksheet. You can hide them but this is not elegant. Have you got any advice?
02-24-2015 11:01 PM
Are you using a fairly recent version of LabVIEW (like 201x)? Are you using the Report Generation Toolkit? Several years ago I migrated a bunch of Excel code from ActiveX to the Excel Object model, and have never regretted it. In the rare case that I needed to tweak properties that weren't exposed in the Toolbox, getting the ActiveX references from the Toolbox made it so much simpler.
Bob Schor
02-25-2015 02:14 AM
Hi @Bob_Schor,
I've tried the NI_object but unfortunately it doesn't allow you to change the decimal view into axis and this is not good for my report. Therefore I decided to redesign it but I wasn't able to change line width of the series. For this I'm here!
I'm usoing the Labview 2014 and I've installed the last version of NI excel model object.
02-25-2015 08:51 AM
I did it by myself....
The attached file show how I did it and it works!
Thank you to all.....
02-25-2015 09:15 AM
02-25-2015 10:35 AM
It's strange because what you are using are the same of what I'm using.MSGraph object.....