+ Reply to Thread
Results 1 to 8 of 8

Bizarre problem exporting graph as jpg... always gives wrong dimensions!

  1. #1
    Registered User
    Join Date
    08-21-2015
    Location
    Brussels, Belgium
    MS-Off Ver
    2013
    Posts
    33

    Bizarre problem exporting graph as jpg... always gives wrong dimensions!

    Hello everyone,

    For one of my publications, I need to export a graph that is exactly 34.2 cm wide x 22.5 cm tall. It is a graph in a spreadsheet tab (not a chartsheet!) in a workbook with 50+ similar graphs to be used for the same publication. No matter what I do, when I export the graph as a jpg, it always has the wrong dimensions. It's not an option to use other software or recreate the workbook. We must use this file.

    I've tried adjusting the dimensions of the chart area manually in Excel:
    Capture1.GIF



    I've tried adjusting the dimensions with VBA:
    Please Login or Register  to view this content.


    I've even tried exporting this with add-on software, such as KUTOOLS and XL TOOLBOX NG. Doesn't work.



    No matter what I do, the jpg always has the wrong dimensions:
    Capture2.GIF
    1036 pixels = 27.4 cm
    683 pixels = 18.1 cm



    I've scoured the internet for help, but nothing is working. A simplified version of this spreadsheet can be downloaded from my Google Drive:

    https://drive.google.com/file/d/1d2b...ew?usp=sharing

    Does anyone have any ideas on how I can fix this? Thanks so much for your help.




    P.S.

    Here is the code I'm using to export the images as .jpg files:

    Please Login or Register  to view this content.

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Bizarre problem exporting graph as jpg... always gives wrong dimensions!

    Hi,

    Given that you always get the same pixel counts, why don't you just scale your current chart size by the required amount to get the output you want?
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Registered User
    Join Date
    08-21-2015
    Location
    Brussels, Belgium
    MS-Off Ver
    2013
    Posts
    33

    Re: Bizarre problem exporting graph as jpg... always gives wrong dimensions!

    Hi xlnitwit...

    That is indeed a solution that crossed my mind. But it's likely that other charts are going to have this same problem (we have hundreds we need to export as jpgs), and it would be extremely inefficient to figure out custom dimensions for each graph. This is just one example.

    Do you have any ideas on how I could go about this more efficiently?

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Bizarre problem exporting graph as jpg... always gives wrong dimensions!

    Everything will be dependent upon resolution. What are you actually doing with the picture?

  5. #5
    Registered User
    Join Date
    08-21-2015
    Location
    Brussels, Belgium
    MS-Off Ver
    2013
    Posts
    33

    Re: Bizarre problem exporting graph as jpg... always gives wrong dimensions!

    These charts are being sent to our publisher to be put in our upcoming end-of-year publication.

    The 34.2 x 22.5 dimension is the size specified by our publisher.

    The images can't be forced to artificially fit the dimensions because they will become pixelated and not be of high enough quality for our publication.

    That's why I really need to find a way to export these in the right dimensions.

  6. #6
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Bizarre problem exporting graph as jpg... always gives wrong dimensions!

    But the size of any image is going to depend on the DPI of however they are being used. I'm surprised they give you a size without specifying that, or the number of pixels given that you could make a 30x30 pixel image into that size.

  7. #7
    Registered User
    Join Date
    08-21-2015
    Location
    Brussels, Belgium
    MS-Off Ver
    2013
    Posts
    33

    Re: Bizarre problem exporting graph as jpg... always gives wrong dimensions!

    Not an expert in this area, some I'm unsure. But I guess, if they didn't specify this, that they assume that the standard settings are okay?

  8. #8
    Registered User
    Join Date
    08-21-2015
    Location
    Brussels, Belgium
    MS-Off Ver
    2013
    Posts
    33

    Re: Bizarre problem exporting graph as jpg... always gives wrong dimensions!

    Let me give some more information:

    For MOST charts in our workbook, the jpg output matches perfectly the dimensions that we specify in the format - size tab. This is good enough for the publisher.

    It's only in a minority of graphs that we get output dimensions in the jpg that differ from what we enter in the format - size tab.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] My dimensions are wrong in order
    By lemar69 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-11-2018, 08:06 AM
  2. Excel for Mac 2011: goal seek function produces bizarre output, what's wrong?
    By Vitale in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 1
    Last Post: 05-18-2016, 01:23 AM
  3. Problem when exporting line graph the points are not equally spaced out
    By chompyrud in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 02-01-2016, 07:28 PM
  4. Scatter graph with multi dimensions
    By moshtarak in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 02-14-2013, 07:53 PM
  5. Bizarre Problem
    By nt180792 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-15-2009, 12:50 AM
  6. dimensions of a graph
    By Justme47 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-09-2008, 08:11 AM
  7. [SOLVED] Graph dimensions
    By Ed in forum Excel General
    Replies: 2
    Last Post: 04-29-2006, 11:10 AM

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