LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel Chart : operations on series using active X

I use Active X to display XY graphs and its corresponding data on an excel sheet but i have difficulties playing with the series.

For example, the first graph corresponds to f(B)=A where A and B are excel columns, and the second corresponds to f(C)=A.

 

Unfortunately, on the second graph, the first serie f(B)=A appears even if I specify the correct range in SourceData. i tried to delete it with the Series Collection but i don't really know how to use this node with Labview.

 

Following is the VBA script :

Sub Macro2()
    Range("A1:A4,C1:C4").Select
    Range("C1").Activate
    Charts.Add
    ActiveChart.ChartType = xlLineMarkers
    ActiveChart.SetSourceData Source:=Sheets("Feuil1").Range("A1:A4,C1:C4"), _
        PlotBy:=xlColumns
    ActiveChart.SeriesCollection(1).Delete
    ActiveChart.SeriesCollection(1).XValues = "=Feuil1!R1C1:R4C1"

 

 

I would be glad if i could get the graph corresponding to the specified range...and if someone can explain me how to use the SeriesCollection to be able to rename my series, delete some, etc...

Thanks!!

Chris

 

0 Kudos
Message 1 of 3
(4,991 Views)

I found how to rename series, but i am still searching how to define ranges like in excel : sheet1!R1C1:R100C2 to jump intermediate columns...

 

ScreenShot007.jpg

Message 2 of 3
(4,972 Views)

Found the solution on this thread : http://forums.ni.com/ni/board/message?board.id=170&message.id=142170&query.id=1860717#M142170

 

I was giving bad arguments to XValues and Values...

 

Series.jpg

Message 3 of 3
(4,954 Views)