+ Reply to Thread
Results 1 to 2 of 2

Automated (programmed) saving multiple data row from Excel spreadsheet as images...

  1. #1
    Registered User
    Join Date
    03-05-2020
    Location
    Hungary
    MS-Off Ver
    360
    Posts
    2

    Automated (programmed) saving multiple data row from Excel spreadsheet as images...

    Hello!

    There is an excel table, the top row of which I have "fixed", it will be called a header and I would like to export the following:

    - the header itself and below the first line in jpeg (or other) image format, followed by the other lines in the same order: the header and the second line, the third line ... also as an image and so on ...

    So I want to save images from a thousands of spreadsheets so that each image has a header and a specific next row.

    And when saving images, the name of the image would be the content of a line-by-line text record in the first two columns (A, B) of the table ...

    Can I write a macro for this?

    Thank you in advance for your help!

    Original data sheet:
    original data sheet.jpg

    Exported pictures 1:
    0001_outdoor black paint 5l.jpg

    Exported pictures 2:
    002_outdoor red paint 5l.jpg

    Exported pictures 3:
    003_outdoor green paint 5l.jpg
    Last edited by AlexRogan; 03-08-2020 at 05:48 AM.

  2. #2
    Registered User
    Join Date
    03-05-2020
    Location
    Hungary
    MS-Off Ver
    360
    Posts
    2

    Re: Automated (programmed) saving multiple data row from Excel spreadsheet as images...

    "And when saving images, the name of the image would be the content of a line-by-line text record in the first two columns (A, B) of the table ..."

    I've found a solution to this:

    Sub SaveImages()

    'the location to save all the images
    Const destFolder$ = "C:\users\...\desktop\"

    Dim ws As Worksheet
    Set ws = ThisWorkbook.Worksheets("sheet1")

    Dim ppt As Object, ps As Variant, slide As Variant

    Set ppt = CreateObject("PowerPoint.application")
    Set ps = ppt.presentations.Add
    Set slide = ps.slides.Add(1, 1)

    Dim shp As Shape, shpName$
    For Each shp In ws.Shapes
    shpName = destFolder & shp.TopLeftCell.Offset(1, 1) & ".png"
    shp.Copy
    With slide
    .Shapes.Paste
    .Shapes(.Shapes.Count).Export shpName, 2
    .Shapes(.Shapes.Count).Delete
    End With
    Next shp

    With ps
    .Saved = True
    .Close
    End With
    ppt.Quit
    Set ppt = Nothing

    End Sub

    The following is not solved:
    Cell A1 content + Cell B1 content + Cell C1 => merged should contain a single one image! Then more A2 + B2 + C2 = also an image, etc ...

    I waiting for suggestions, ideas?

+ 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. save excel range as bmp and paste bmp image to gmail body
    By shiva_raj in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-03-2019, 04:08 AM
  2. save excel range as bitmap image into folder
    By shiva_raj in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-31-2019, 09:29 PM
  3. Vlookup into an image folder and importing the image into the spreadsheet?
    By talan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-30-2017, 12:54 PM
  4. Add image from Form to Excel spreadsheet?
    By macro2014 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-07-2014, 12:16 PM
  5. Replies: 1
    Last Post: 09-28-2013, 03:50 AM
  6. How to save object as image in Excel 2010?
    By Verdania in forum Excel General
    Replies: 2
    Last Post: 05-21-2012, 12:21 PM
  7. Replies: 1
    Last Post: 05-05-2009, 05:46 PM

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