ExcelHome技术论坛

 找回密码
 免费注册

QQ登录

只需一步,快速开始

快捷登录

搜索
EH技术汇-专业的职场技能充电站 妙哉!函数段子手趣味讲函数 Excel服务器-会Excel,做管理系统 效率神器,一键搞定繁琐工作
HR薪酬管理数字化实战 Excel 2021函数公式学习大典 Excel数据透视表实战秘技 打造核心竞争力的职场宝典
让更多数据处理,一键完成 数据工作者的案头书 免费直播课集锦 ExcelHome出品 - VBA代码宝免费下载
用ChatGPT与VBA一键搞定Excel WPS表格从入门到精通 Excel VBA经典代码实践指南
查看: 24331|回复: 25

给Word与Excel文档减肥

[复制链接]

TA的精华主题

TA的得分主题

发表于 2004-4-22 13:21 | 显示全部楼层 |阅读模式

在编辑Word文档时,细心的人会发现,原来只有几十K的文档经过几次编辑后,身材竟然胖达上百K,甚至几百K,这是什么原因呢?怎样来给它减肥呢?试试下面的办法吧。      1.关闭“快速保存”选项      在Word中,打开“工具→选项→快速保存”选项,选中这个选项时,每次进行保存文档的操作则只保存文档的修改部分,保存速度较快,但文档的大小也会增加,即使是对文档进行删减操作也是如此。目前计算机的速度较快,因此开启这项功能所带来速度的增加毫不明显,但付出的代价是文档的大小急剧膨胀,建议不要选中这个选项。如果你有一个Word文档选中了这个选项,那么试着关闭这个选项,再对文档稍作修改,然后保存,你会惊奇地发现文档的大小会大幅度缩小!      2.选择适当的图片格式      在Word文档中引用的图片格式一般有三种,BMP、JPG、GIF。BMP格式保存的图片保真度较高,但大小往往是其它两种格式的几倍至几十倍,而照片、扫描图片等用GIF格式保存则失真非常严重,因此建议图片先采用JPG格式保存,然后再引入到Word文档中,这种格式的图片大小不仅比BMP格式小很多,而且往往也比GIF的格式小,而保真度与BMP格式则相差无几。      3.利用“插入”引入图片      在Word中插入图片有两种方法,第一种是将图片保存为一个JPG格式的文件,选择“插入→图片→来自文件”,打开“插入图片”对话框,选中所需插入的图片文件,点击“插入”即可。另一种是用“画图”、“Microsoft照片编辑器”等打开这个JPG文件,选中并复制,然后在Word中点击“粘贴”即可插入。强烈建议大家采用第一种方法,虽然两种方法在Word中得到的图片质量是一样的,但第一种方法所形成的Word文档的大小可能会比第二种小几十倍!      4.利用工具软件调整图片大小      虽然当图片引入Word文档后,可以改变图片的尺寸,但是这对文档的大小并没有影响,而在“Microsoft照片编辑器”等软件中,减小图片的尺寸则会使图片文件的大小相应减小,因此建议先在工具软件中将图片的尺寸减小至合适的程度,然后再引入至Word文档中,这样也能有效降低Word文档的大小。      上述方法不仅对Word文档有效,而且对于Excel和PowerPoint文档也是可行的,有时甚至能将文档大小减少为原来的几十分之一。

文章来源:http://software.asiaec.com/zh_cn/jckt/soft/bgrj/11018831/20040414/50084.html

TA的精华主题

TA的得分主题

发表于 2004-4-22 13:25 | 显示全部楼层

这是EXCEL HACKS中关于如何给Excel减肥的,没功夫翻,自己看吧。

Reduce Workbook Bloat

Ever notice that your workbook is increasing in size at an alarming rate for no apparent reason? There are several causes of workbook bloat, and some slimming solutions.

Have you ever eaten so much that you can't function properly? Workbook bloat in Excel is much the same thing. Workbook bloat is a term for a workbook that has had so much done to it that it has swollen to such a size it can no longer function correctly.

We checked out the size of a typical workbook containing a fairly large amount of data. With data only, the workbook file size was 1.37 MB. Then we added a pivot table referencing four entire columns for its data source and noted that the file size increased dramatically to 2.4 MB. Add some formatting and your typical workbook size has blown out to almost double by performing a few actions.

One of the more common causes of file bloat, particularly in earlier versions of Excel, is the application of formats to entire columns or rows rather than to just the data range in use. Another mistake is referencing entire columns as the data source for charts and pivot tables rather than just the cells with actual data in them. To fix these problems, you will need to eliminate all the superfluous formatting and restrict your data source to only the useful range of cells.

Before doing such refactoring, always make a copy of your workbook for safekeeping.

Eliminating Superfluous Formatting

The first step in eliminating superfluous formatting is to figure out where your worksheet's data ends—the bottom righthand corner of your data, if you will. Don't rely on Edit Go To... Special Last Cell, as this might take you to the last cell containing formatting, not actual data. Having manually located the cell you know to be your last cell containing legitimate data, highlight the row immediately following it. While pressing the Ctrl and Shift keys, press the down arrow on your keyboard to highlight all rows beneath that row and select Edit Clear All to clear them.

Now apply the same logic to unwanted formatting lurking in your columns. Locate the cell in the last column containing data and click the column header of the column immediately to the right. Press Ctrl-Shift and the right arrow on your keyboard to highlight all other columns to the right and then select Edit Clear All.

Don't be tempted to actually delete these rows or columns rather than clearing them, as doing so often causes the dreaded #REF! error in any cells of any formulas that might reference them.

Save your workbook and take gleeful note of the change in its file size by selecting File Properties... General.

If you have macros, now you need to address the modules that the macro code resides in. This is a fairly quick, painless, and straightforward process that entails exporting all modules and UserForms to your hard drive and then deleting the existing modules and UserForms, pressing Save, and importing the modules you exported.

To do this, go into the Visual Basic Editor and, from within the Project Explorer, right-click each module and select Remove Module1 (or whatever the name of the module happens to be). When you are asked whether you want to export your module before removing it, say Yes, taking note of the path.

Do this for each module in turn, as well as for any UserForms you might have. Don't forget the private modules of your workbook and worksheets if they house code as well. Once you have done all this, save the workbook. Then, select File Import File and import each module and UserForm back into your workbook. Following this process will create a text file of each module and that, in turn, removes all extra baggage that the modules might be holding.

The Web contains some free utilities that will automate this task to some degree, but we have heard cases of these utilities making a mess of code or even increasing file sizes. If you do use one of these, always save a backup copy first, as the developers will take no responsibility for any loss of data.

Honing Data Sources

If, after performing the previous steps, you still believe your file size is unrealistically large, another possible suspect is referencing unused cells in PivotTables and PivotCharts. This is true particularly of PivotTables, as people frequently reference all 65,536 rows in order to avoid manually updating ranges as new data is added. If this is your modus operandi, use dynamic named ranges [Hack #42] for your data sources instead.

Cleaning Corrupted Workbooks

If you still believe your workbook is too large, it is possible that your workbook or component sheets are corrupt. Unfortunately, determining a point of corruption requires a manual process of elimination.

Again, we strongly advise you to save a copy of your workbook before proceeding.

To be sure you're not missing anything, unhide any hidden sheets by selecting Format Sheet Unhide. If this menu option is grayed out, you have no hidden worksheets to worry about. With all your sheets visible, start from the sheet on the far left and move one-by-one to the right. For each in turn, delete it, save your workbook, and note its file size by selecting File Properties General. If the file size drops dramatically considering the amount of data on that sheet, you've probably found your corruption.

To replace a corrupt sheet in your workbook, create a new worksheet, manually select the data in the corrupt sheet, and cut (do not copy) and paste it into the new sheet. Delete the corrupt sheet from your workbook, save, and repeat.

By cutting rather than copying, Excel automatically will follow the data to the new sheet, keeping references intact.

TA的精华主题

TA的得分主题

发表于 2004-4-22 13:34 | 显示全部楼层

收到.谢谢二位.

第一项:没有选中"快速保存"

第二项:也做到了,全保存的是.JPG文件.

第三.四项:有没注意,下次一定管理好.

[此贴子已经被作者于2004-4-22 13:35:59编辑过]

TA的精华主题

TA的得分主题

发表于 2004-4-22 14:23 | 显示全部楼层
哦哦哦,最麻烦的是ppt的减肥。我个人的经验是,不要在ppt里面改变图片的显示比例(显示大小)。而是用Photoshop等图片编辑器,改变图片的实际大小再插入。至于BMP好,还是JPG好,我觉得不一定,要看你如何操作了,虽然作为看起来同样质量的图片JPG比BMP小很多,但是如果插入ppt(word,excel)中,再改变图片的大小(鼠标托动)的话,BMP这种点阵图就有优势了,反倒JPG矢量图没有优势了。毕竟BMP是MS创的

TA的精华主题

TA的得分主题

发表于 2004-4-22 16:08 | 显示全部楼层

图片用acdsee-->tools--〉convert 可以改变格式 , 我觉得既然不用打印出来,直接做成gif的不是更小麽

TA的精华主题

TA的得分主题

发表于 2004-4-25 08:20 | 显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件       ★免费下载 ★       ★ 使用帮助

谢谢!

TA的精华主题

TA的得分主题

发表于 2005-8-14 14:23 | 显示全部楼层
其实,用另存为这个功能,也可以大幅度地减小文件的体积

TA的精华主题

TA的得分主题

发表于 2007-6-8 07:24 | 显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件       ★免费下载 ★       ★ 使用帮助
好东西啊 收藏 支持楼主

TA的精华主题

TA的得分主题

发表于 2007-7-30 02:16 | 显示全部楼层

TA的精华主题

TA的得分主题

发表于 2007-9-30 17:32 | 显示全部楼层
您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

手机版|关于我们|联系我们|ExcelHome

GMT+8, 2024-11-25 02:34 , Processed in 0.043747 second(s), 8 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 1999-2023 Wooffice Inc.

沪公网安备 31011702000001号 沪ICP备11019229号-2

本论坛言论纯属发表者个人意见,任何违反国家相关法律的言论,本站将协助国家相关部门追究发言者责任!     本站特聘法律顾问:李志群律师

快速回复 返回顶部 返回列表