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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

excel series

Solved!
Go to solution

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

 

Graph.Chart Series

 

Thank you in advance.

Ricky
Italian Developer engineer
www.www.selt-sistemi.com
0 Kudos
Message 1 of 8
(3,295 Views)

@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

 

 

Message 2 of 8
(3,279 Views)

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?

Ricky
Italian Developer engineer
www.www.selt-sistemi.com
0 Kudos
Message 3 of 8
(3,267 Views)

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

Message 4 of 8
(3,240 Views)

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.

Ricky
Italian Developer engineer
www.www.selt-sistemi.com
0 Kudos
Message 5 of 8
(3,223 Views)
Solution
Accepted by topic author g_Ricky

I did it by myself....

 

The attached file show how I did it and it works!

 

Thank you to all.....

Ricky
Italian Developer engineer
www.www.selt-sistemi.com
0 Kudos
Message 6 of 8
(3,208 Views)

Glad you were able to solve it by yourself. It tried your solution but it didn't work for me. I used an MsGraph object with an XLline type chart but always ended up with the following error message: Unable to set the Weight property of the Border class.

 

Ben64

0 Kudos
Message 7 of 8
(3,202 Views)

It's strange because what you are using are the same of what I'm using.MSGraph object.....

Ricky
Italian Developer engineer
www.www.selt-sistemi.com
0 Kudos
Message 8 of 8
(3,194 Views)