• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Re: excel 2004 chart question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: excel 2004 chart question


  • Subject: Re: Re: excel 2004 chart question
  • From: trinko <email@hidden>
  • Date: Mon, 24 May 2004 21:12:16 -0700

Thanks. when i said you can't make a chart object i really meant you can't make an instance of the chart class. of course excel has a chart class which is inside of instances of the chart object class--I really think you shouldn't use object in a class name. you can't make a chart instance but you can make a chart object instance in a worksheet. you can get a chart instance from the chart object instance.

The data table is a red herring I think, i think it determines if your chart shows the data in a table at the bottom of the chart.
according to the dictionary entry for chart group
a chart contains one or more chart groups. each chart group contains one or more series

now the series class has a property called "series values" which seems to define what data is going to be plotted

but if i try
make new line group at the end of a_chart
it tells me i can't make a line group. same thing for xy group. even though both are listed as elements of the chart class
i checked and when you make a chart it already has a chart group instance so i tried and create a series in that--not knowing how to tell what type of chart type, ie line scatter etc, that chart group should be-- but i was told i can't create a series either.

other wierdness. the lines

set the name of the_chart to "Melvin"
and
set z to make new chart object at the end of document 1
set the name of the chart of z to "Melvin"

both fail telling me i can't set the name but name isn't r/o!

i looked up, on the web, how you do this with VBA and it's a lot simpler and I don't see all of these classes.


Message: 1
Date: Sun, 23 May 2004 18:25:20 -0700
Subject: Re: excel 2004 chart question
From: Paul Berkowitz <email@hidden>
To: AppleScript-Users <email@hidden>

On 5/23/04 4:06 PM, "trinko" <email@hidden> wrote:

You apparently can't make a chart object and you can't make a chart
object at the end of the chart objects of the current worksheet.
anyone know how to make a chart? thanks.

You certainly can make a chart object. You have to peruse the dictionary to
see where to make it. It's not an element of 'application' so you can't make
it out of thin air. But of you look at 'sheet' and 'worksheet', you'll see
they both have 'chart object' as an element. So this works (up to a point):


tell application "Microsoft Excel"
set chartObj to make new chart object at active sheet with properties
{height:120.0, left position:35.0, rounded corners:false, shadow:true,
top:15, width:75.0}
set theChart to chart of chartObj
set chart type of theChart to column clustered
set bar shape of theChart to cylinder
end tell



Since I don't actually know anything whatsoever about Excel charts, I'm not
sure where to go from there - how to get significant data into the chart. I
notice there's a 'data table object' property of chart of class 'data table'
whose properties can be set but they don't contain anything representing raw
data. Perhaps the very fact that the chart object can be made to belong to
the sheet, or a sector of the sheet, will automatically give it the data
contained in that range. You probably know all about that aspect already, or
could find it in the VB Help.

I see also that a workbook can have chartsheets as elements, and a
chartsheet has a chart property.

--
Paul Berkowitz

--
tom trinko http://members.aol.com/trinkos/basepage.html
email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: Unacceptable Rudeness (was "Unsafe Handlers Revisited")
  • Next by Date: Re: Setting up a cron job
  • Previous by thread: Re: excel 2004 chart question
  • Next by thread: ANNOUNCE: XML Tools 2.7
  • Index(es):
    • Date
    • Thread