+ Reply to Thread
Results 1 to 8 of 8

Excel rotating and moving some images on upload

  1. #1
    Registered User
    Join Date
    07-25-2017
    Location
    England
    MS-Off Ver
    2013
    Posts
    86

    Excel rotating and moving some images on upload

    Hi,
    I have made a button on excel where you can upload images and fit them to a box in a certain cell using the following code:
    Please Login or Register  to view this content.
    Basically, the majority of the images that I will be using are 16:9, the box that excel will fit the images to is also of this ratio. However, certain images are being taken on a different device which only allows 4:3, I have hence unlocked the aspect ratio at the end of the above code so it squashes any images into the correct position. The following code is just formatting of the image after insertion:
    Please Login or Register  to view this content.
    This code works perfectly fine most of the time, it puts 16:9 images in the correct places and re-sizes the 4:3 ones to fit. However, I have found that randomly excel likes to rotate and move images upon insertion. It may be a complete co-incidence, but the ones that it seems to rotate are normally upside down or in a side view... it is not the device, because some from the same device work and others don't. it almost seems like excel is trying to rotate them to be upright, but it also throws them about 800-900 pixels to the right in doing so. I was just wondering if anyone had encountered this before and if they knew how to stop excel from rotating and moving them? Any suggestions are appreciated, Thanks

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,737

    Re: Excel rotating and moving some images on upload

    I've checked with 15 jpgs (var size and ratio). All have been fit into C7:G7 without rotating.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Registered User
    Join Date
    07-25-2017
    Location
    England
    MS-Off Ver
    2013
    Posts
    86

    Re: Excel rotating and moving some images on upload

    Yea, its really strange. It is very rare, but it does happen and I don't understand why. I would give you a couple of the photos that it has happened with, but I would probably get in trouble for sending them out as they aren't mine.

  4. #4
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,737

    Re: Excel rotating and moving some images on upload

    Did you identify any pattern with this issue?
    Size / ratio / pic format / resolution?

  5. #5
    Registered User
    Join Date
    07-25-2017
    Location
    England
    MS-Off Ver
    2013
    Posts
    86

    Re: Excel rotating and moving some images on upload

    I have tried with 4 photos, all of these were taken on a Samsung phone as JPEG, the camera takes photos in 4:3 aspect ratio. Three out of Four were working absolutely fine, two were in portrait mode, 3024 x 4032 but the other two were in landscape mode 4032 x 3024. The one that wasn't working was one of the landscape ones. The button has no problem fitting the other landscape one properly, but the other jumps to the right and rotates by 90 degrees. It seems to fix it, if you delete the image, go back into the file directory and rotate the image via the windows interface before putting it back in to the sheet. I find it very strange, also, if i then rotate the image back to the initial orientation, it works!

    Also, by size I assume you mean memory? One of the ones that was not working is significantly larger, 5mb rather than 2mb. However, I don't think this is an issue as I have also had problems with one of the ones that was 1-2mb
    Last edited by georgedixon; 07-11-2019 at 07:24 AM.

  6. #6
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,737

    Re: Excel rotating and moving some images on upload

    Check EXIF data of these pictures. I think it could be the reason.

    Look at this: https://www.howtogeek.com/254830/why...ectly-rotated/

  7. #7
    Registered User
    Join Date
    07-25-2017
    Location
    England
    MS-Off Ver
    2013
    Posts
    86

    Re: Excel rotating and moving some images on upload

    Quote Originally Posted by KOKOSEK View Post
    Check EXIF data of these pictures. I think it could be the reason.

    Look at this: https://www.howtogeek.com/254830/why...ectly-rotated/
    Thank you! that post led me to this one https://stackoverflow.com/questions/...34741#50634741 which solved my problem

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: Excel rotating and moving some images on upload

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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] upload images in excel file
    By anilpatni1234 in forum Excel Programming / VBA / Macros
    Replies: 50
    Last Post: 05-01-2019, 04:27 AM
  2. [SOLVED] User entry or "upload" of images in userform for later recall.
    By IMM Tech in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-04-2018, 11:22 AM
  3. [SOLVED] Moving images based on cell value
    By Tortus in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-17-2014, 11:28 AM
  4. [SOLVED] Excel 2007 : Rotating images and serch engine in 2007
    By mrjinx007 in forum Excel General
    Replies: 0
    Last Post: 06-14-2012, 02:16 PM
  5. Bulk upload images using excel
    By TimothyBateman in forum Excel General
    Replies: 0
    Last Post: 05-10-2012, 07:19 PM
  6. Images moving in print preview?
    By Indyaga in forum Excel General
    Replies: 2
    Last Post: 02-03-2009, 05:20 PM
  7. Moving images on form
    By Steel Monkey in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-12-2007, 01:49 AM

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