+ Reply to Thread
Results 1 to 5 of 5

Batch generation of jpgs from charts in Mac Office 2008

  1. #1
    Registered User
    Join Date
    06-24-2009
    Location
    Palo Alto, CA
    MS-Off Ver
    Excel Mac 2008, Excel 2007
    Posts
    3

    Batch generation of jpgs from charts in Mac Office 2008

    I have a spreadsheet with monthly data for a variety of products. All the data is contained on one page and each product has a chart on its own tab. I'd like to output the charts to jpegs for presentation on the web, with the names of the jpegs matching the names of the tabs [e.g. 3 chart tabs = 3 jpgs]. I plan to run this on a weekly or monthly basis. Is this possible to do in a batch process in Mac Office 2008 or will I need to use a VBA-capable windows version of Excel?

    I have attached an xls with 3 sample products, but envision using this for up to 90 products.

    Thank you for any suggestions.
    Attached Files Attached Files

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Batch generation of jpgs from charts in Mac Office 2008

    I know VBA was removed but does the mac not contain any scripting capability now?

    If not then I guess you answered your own question with,
    "will I need to use a VBA-capable windows version of Excel"
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    06-24-2009
    Location
    Palo Alto, CA
    MS-Off Ver
    Excel Mac 2008, Excel 2007
    Posts
    3

    Re: Batch generation of jpgs from charts in Mac Office 2008

    Thanks for the reply Andy. I don't see a scripting option in Mac Excel 2008 but it might be possible via the OS (Automator).

    In any case, I can try it in Excel 2007. I'm new to VBA so I want to see if I can get some guidance on creating a script.

    I found the following, which works for converting a chart into a jpg. How would I modify this script so it would go through all the tabs in a worksheet, saving all the charts as jpgs?

    Your assistance is much appreciated.

    Sub DiagrammAlsJPGSpeichern()

    Dim GDiagramm As Chart

    Dim NameT As String

    Const PfadDiagramm = "C:\"

    Set GDiagramm = ActiveChart

    NameT = InputBox("Name of Chart:", "Export Chart", ActiveChart.Name)

    If NameT <> "" Then

    GDiagramm.Export Filename:=PfadDiagramm & NameT & ".JPG", FilterName:="JPG"

    End If

    End Sub

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Batch generation of jpgs from charts in Mac Office 2008

    try this
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-24-2009
    Location
    Palo Alto, CA
    MS-Off Ver
    Excel Mac 2008, Excel 2007
    Posts
    3

    Thumbs up Re: Batch generation of jpgs from charts in Mac Office 2008

    You are awesome Andy!

    Thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1