Jump to content
Sign in to follow this  

Excel charts

Recommended Posts



I try to create an Excel chart and set the XValues with a range of cells but it doesn't work.

Here is the code I use, the chart is Ok, the position and the title too but not the Xlabel.

$objExcel.ActiveChart.ChartType = $xlLine;Lignes.
$objExcel.ActiveChart.SetSourceData ($objExcel.Worksheets($xlFeuilleOrdi).Range("E2:E" & String($xlLigDonnes)), 2) $objExcel.ActiveChart.SeriesCollection(1).XValues = "=ACACIA!R2C1:R1000C1"
$objExcel.ActiveChart.Location ($xlLocationAsObject, $xlFeuilleAnalyse)
With $objExcel.ActiveChart
    .HasTitle = True
    .HasLegend = False
    .ChartTitle.Characters.Text = $xlFeuilleOrdi & " : utilisation réseau"
    .Parent.Top = $objExcel.ActiveSheet.Range("D" & String($xlLig)).Top
    .Parent.Left = $objExcel.ActiveSheet.Range("D" & String($xlLig)).Left
    .Parent.Name = $xlFeuilleOrdi & "_Graph_Réseau"

I'm searching a solution since a lot of days but anything works. I didn't find solution on the forum.

I tried the Kerros' function without success.

Thanks for your help.


Share this post

Link to post
Share on other sites

Any ideas ? ?

I post a picture to show what I get and what I need.

It seems the code for XValues is ignored by Excel or Autoit.

A syntax error ?


Posted Image

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.