import zipfile
filename = 'Sample.xlsx'
prefix = filename.split('.xlsx')[0]
embed_path = '%s/xl/embeddings/' % prefix
embedded = []
with zipfile.ZipFile(filename, 'r') as fd:
for zipinfo in fd.infolist():
fn = zipinfo.filename
# Ignore the directory itself, we just want the files.
if fn != embed_path and fn.startswith(embed_path):
embedded.append(fn)
print "Extracting %s" % fn
fd.extract(zipinfo)