AlainN Posted June 20, 2008 Posted June 20, 2008 Hello, 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.Charts.Add() $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" EndWith 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. Alain.
AlainN Posted June 21, 2008 Author Posted June 21, 2008 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 ?Thanks.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now