+ Reply to Thread
Results 1 to 7 of 7

Add Geolocation to Images from Excel

  1. #1
    Registered User
    Join Date
    11-26-2019
    Location
    Thane
    MS-Off Ver
    2021
    Posts
    42

    Add Geolocation to Images from Excel

    Dear experts,

    I have multiple images stored in a folder, and their names are listed in column A of my Excel sheet. I would like to add geo-location data to these images using Excel VBA.
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,223

    Re: Add Geolocation to Images from Excel

    Try:
    Please Login or Register  to view this content.
    Artik

  3. #3
    Registered User
    Join Date
    11-26-2019
    Location
    Thane
    MS-Off Ver
    2021
    Posts
    42

    Re: Add Geolocation to Images from Excel

    Thanks @Artik

    I think i made some confusion, i want excel latitude longitude to image file.

  4. #4
    Registered User
    Join Date
    03-12-2022
    Location
    Argentina
    MS-Off Ver
    2016
    Posts
    26

    Re: Add Geolocation to Images from Excel

    hi,
    In the example below, select the image and then the macro inserts the geolocation and date that are embedded in the image, in the bottom left corner of the image, and then saves the image to the desktop with the same name.

    putlatitudeandlongitudeinimage.xlsm

  5. #5
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    Re: Add Geolocation to Images from Excel

    The GPS datas are found in the EXIF properties of an image file and can be read if exists by WIA (Windows Image Acquisition)

    If not exists, can be added by third party programs such as "ExifTool" by Phil Harvey (https://exiftool.org/)

    But, if you like to have a simple solution by VBA using the WIA object; the following simple code will add the GPS data in the "Comments" section of the JPG file as seen in the picture below.



    The code will create a new file in the same directory with a file name starting with "New_***"

    Please Login or Register  to view this content.
    Attached Images Attached Images
    Last edited by Haluk; 03-29-2024 at 03:32 AM.

  6. #6
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    Re: Add Geolocation to Images from Excel

    I worked on the subject and finally managed to add "Longitude" data (decimal 24.858) to the image file's GPS section as seen in the picture below, by the following code.

    Please Login or Register  to view this content.

    Latitude and altitude datas can also be added by using appropriate values and similar methods.
    Attached Images Attached Images

  7. #7
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    Re: Add Geolocation to Images from Excel

    @ rajatds31,

    Seems you have lost your interest on the subject

+ 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. GeoLocation Sorting
    By nathanthomas78 in forum Excel General
    Replies: 3
    Last Post: 09-17-2021, 10:17 AM
  2. Fetch Geolocation of Device
    By Afpb505 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-04-2021, 11:41 AM
  3. [SOLVED] Saved Images in Google Drive used for Dynamic Images in Excel
    By gtnilc in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-10-2021, 02:35 AM
  4. Replies: 7
    Last Post: 05-28-2020, 08:33 AM
  5. Replies: 0
    Last Post: 01-01-2014, 04:36 PM
  6. GeoLocation data (Lat/Lon)
    By bstubbs in forum Excel General
    Replies: 4
    Last Post: 01-13-2011, 02:40 PM
  7. GeoLocation data (Lat/Lon) crossStreet
    By bstubbs in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-10-2009, 01:01 PM

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