1

I have a Excel file that contains 600 small images, I've tried to use Excel image compression but it did nothing, is there another easy way to really compress these images?

3
  • what exactly you've tried? Have you set resolution to the smallest one? Applied to all pictures? Dec 12, 2015 at 18:09
  • I selected all images, clicked "Compress Images" in Format tab, compressed all, no change at all. I've set the smallest resolution 96dpi, the images are small, like 200px width 80 height. I guess excel resizes the image keeping the original size image, so it's size continues big.
    – user532948
    Dec 12, 2015 at 18:13
  • 1
    My question here would be why are you using 600+ images in excel?
    – Miller86
    Dec 14, 2015 at 14:10

1 Answer 1

0

A similar question came up for Word pictures and using copy and paste special as jpeg seems to reduce file size considerably (see How to automate 'paste as JPEG' for pasting pics in Word so as to reduce the entire document size?)

Try a macro to loop through pictures and copy and paste special as jpeg:

Sub test()

Dim shp As Object
If ActiveSheet.Pictures.Count = 0 Then Exit Sub

For i = ActiveSheet.Pictures.Count To 1 Step -1

   Set shp = ActiveSheet.Pictures(i)

        shp.Select

        Dim iTop As Integer
        Dim iLeft As Integer
        iTop = Selection.Top
        iLeft = Selection.Left


        Selection.Cut

        ActiveSheet.PasteSpecial Format:="Picture (JPEG)", Link:=False, _
        DisplayAsIcon:=False

        Selection.Left = iLeft
        Selection.Top = iTop

Next

End Sub

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .