Last week, someone asked if I could stop zipping the sample Excel files that you can download from my website. Well, I thought about it carefully, and decided to leave things as they are. Excel helped me decide, and you can get the macro that I used, to list all Excel files with dates and sizes.
上周，有人问我是否可以停止压缩可从我的网站下载的示例Excel文件。 好吧，我仔细考虑了一下，并决定保留原样。 Excel帮助我做出决定，并且您可以获得我使用的宏，以列出具有日期和大小的所有Excel文件。
为什么要压缩文件？ (Why Zip the Files?)
The person who asked me to stop zipping the files noted that "These days, difference between a 30 and 40KB download is trivial."
That's true for most people, I'm sure, although there must still be some people on slower internet connections.
But what's the real size difference between zipped and unzipped Excel files? Is that 30/40 kb example valid?
但是，压缩的和未压缩的Excel文件之间的实际大小差异是什么？ 那30/40 kb的示例有效吗？
很久以前的文件 (Long Ago Files)
My Contextures website went online in November 2000, and the Wayback Machine site has archived copies of my Excel Sample Files page.
我的Contextures网站于2000年11月上线，而Wayback Machine网站已存档了我的Excel Sample Files页面的副本。
That year, there were only 4 files listed on that page. Three files were available in both XLS and zip format, and one file was in XLS format only.
尺寸差异小 (Small Size Difference)
As you can see, all the files were quite small, and the zipped files were about 1/4 to 1/3 of the original size.
There were a couple of benefits for zipping the sample files:
- Less storage space and bandwidth for my website 我的网站的存储空间和带宽更少
- Smaller files for people on slow internet connections – more people had those in 2002 互联网连接速度慢的人的文件较小-2002年有更多人使用的文件
Unfortunately, I can't find download records from 2002, so I'm not sure which format was more popular.
今天的尺寸差异 (Size Difference Today)
But what about today's Excel files? Is it still worth zipping them?
To get a size comparison, I checked one of my current downloads – the Sample Data file that you can get from the sample data page.
The XLSX file is 65 KB and when zipped, the size only reduces by 8%, to 60 KB
XLSX文件为65 KB，压缩后的大小仅减少8％，为60 KB
压缩的其他好处 (Other Benefits of Zipping)
That 8% difference isn't much, for the person who's downloading the file. If they downloaded the XLSX file, it would only take a bit longer, and they'd save the step of unzipping the file.
From my perspective though, it's not just one download. My site has hundreds of thousands of free Excel files downloaded every year. That's lots of bandwidth, and saving 8-10% is a substantial amount!
但是从我的角度来看，这不仅仅是一次下载。 我的网站每年都有成千上万的免费Excel文件下载。 那是很大的带宽，节省8-10％实在是一笔巨款！
安全问题？ (Security Problems?)
Many of the sample files have macros too, and those might be blocked by company firewalls if they're unzipped.
Do companies prevent you from downloading Excel files with macros, if they're unzipped?
Can you download them if they are zipped?
保留旧链接 (Preserving Old Links)
Another reason for me to keep the zipped files on my site, instead of replacing them with unzipped files is to preserve all the links.
If I deleted all the zip files, all the old links would be broken, and that's never a good thing!
So, I'd have to upload a second copy of each sample file, with a new link to the XLSM or XLSX file (doubling my file storage), and creating a ton of work for myself. That's never a good thing either!
获取Excel文件列表 (Get a List of Excel Files)
So I'll be leaving things as they are, with zipped sample files, unless someone can convince me to do otherwise.
And as promised, you can get a macro to list all the files in a folder, with their name, size and creation date.
Go to the Excel Folder File Macros page on my Contextures site, and there are 3 different workbooks to download (in zipped format!)
转到我的Contextures网站上的“ Excel文件夹文件宏”页面 ，有3种不同的工作簿可供下载(压缩格式！)。
The quickest macro is the one that lists all Files. Put the file path in the worksheet cell, and the macros adds a new sheet with the file list.
您是否压缩文件？ (Do You Zip Your Files?)
If you have an Excel blog or site, do you zip your sample files?
If so, is it to save space and bandwidth, or another reason?