73

OK, this is a weird one. I take my blank Numbers sheet:

Blank sheet imported from blank CSV

...and export it to Excel:

enter image description here

Whoah, that seems a little large. Let's rename the Excel doc to .zip and have a look inside:

enter image description here

Digging a little deeper:

enter image description here

Well, we just found 99% of the file size. But what is it — some sort of embedded preview image? Let's open it:

enter image description here

Nope, just a 635x635 PNG of random noise. Anyone have any idea what's going on here?

41

I'm not sure why it's included in the export, but this is one of the default "Image Fills": Image Fill

  • 2
    Fortunately, it seems that it's possible to delete this image without corrupting the xlsx file using zip -d myFile.xlsx xl/media/image1.png – Bastien Jansen Sep 19 '15 at 14:23
35

tl;dr: it's the default shape fill, strictly unnecessary if there are no shapes.

XLSX, DOCX and other formats use OPC (the open packaging conventions), which mandates the zip container and describes how files should be laid out. If there is a file that you do not recognize, look in the various relationship files (they end in .rels).

In this case, the relevant line can be found in the themes relationship file xl/theme/_rels/theme1.xml.rels:

  <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="../media/image1.png"/>

The file will be referenced in xl/theme/theme1.xml as rId1. Using ECMA-376 as a guide, you will find it referenced as the default shape fill:

<a:objectDefaults>                    <-- shape/line/text defaults
  <a:spDef>                           <-- shape defaults
    <a:spPr>                          <-- shape properties
      <a:blipFill rotWithShape="1">   <-- picture fill
        <a:blip r:embed="rId1"/>      <-- references the picture

The writer must not be omitting the image if there is no shape.

31

Keynote files exported to PowerPoint do things like this too. That PNG is a background fill from Keynote, and is made available to PowerPoint to be used as the default shape fill for shapes created in the exported document. Keynote not only exports your document, but also the template style elements it was created with - even if some of those style elements (i.e. the background image) haven't been used yet.

You must log in to answer this question.