|
楼主 |
发表于 2008-12-2 22:23
|
显示全部楼层
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
见论坛里面有坛友焦急地询问如何修复已损坏的文档。今天抽时间翻译了HACK15
期望有所帮助。最为重要的是:定期备份重要文档。做了重要更新后及时备份。
Hack 15 Extract Data from a Corrupt Workbook
Hack 15 从损坏的工作簿中提取数据
Workbook corruption can mean the loss of vital data, costing you more than just money. This hack explores some methods that might recover your data.
工作簿损坏意味着重要数据的丢失,带来的损失不仅仅是金钱,比这要多。此HACK探索了几种可以恢复数据的方法。
Workbooks sometimes become corrupt for no apparent reason. This can cause all sorts of problems, especially if the workbook is vital and for whatever reason you have no backup. Lesson 1: always back up your data somewhere. Realistically, though, this does not always happen, and corruption can, of course, occur right before your regularly scheduled backup.
工作簿有时没有明显原因而损坏。这会带来各种问题,尤其当工作簿至关重要,且无论是何种原因都没有备份。教训1:总是备份数据到某些地方。实际上虽然不是经常做,损坏会恰恰发生在定期已计划的备份之前。
To add to your frustration, even though you know your workbook is corrupt, you sometimes might still be able to open it and even perform certain actions in it.
更会让人失望的是,即使知道工作簿已损坏,有时仍然可以打开它,甚至在里面进行一些操作。
If You Can Open Your Workbook
如果可以打开工作簿
If you can open the offending workbook, before doing anything else, be sure to save a copy of it; otherwise, you might regret it. If you have a copy, you can always seek professional help!
如果可以打开损坏的工作簿,在做任何其它操作之前,确保另存一份。否则会后悔。如果有一份拷贝,可以一直寻求专业的帮助产。
Now, try opening the workbook in a later version of Excel and simply saving. Obviously this is not possible if you already are using the latest version of Excel.
现在,试着在较高版本的EXCEL中打开,简单地保存一下。当然如果已在使用最新版本的EXCEL, 这是不可能做到的。
If this doesn't work, try opening your workbook and saving the file in HTML or HTM format, then close the file and reopen it, this time saving again in the format you require—e.g., .xls.
如果这样不能修复的话,试着打开工作簿,另存为HTML或HTM格式,然后关闭文件,重新打开HTML或HTM格式的文件,这次另存为想要的格式-比如.XLS.
When saving in HTML or HTM format, the following features will be lost:
当另存为HTML或HTM格式,以下特性将丢失:
• Custom views
• 自定义视图
• Unused number formats
• 未使用的数字格式
• Unused styles
• 未使用的样式
• Data consolidation settings
• 数据合并设置
• Scenarios
• 方案
• Natural language formulas (they are converted to standard range references)
• 自然语言公式(将转换为标准的单元格区域引用)
• Custom function categories
• 自定义函数
• Strikethrough, subscript, and superscript elements
• 中间划线,上标,下标元素
• Change History
• 更改历史
• Customized page setup settings for charts that are embedded on a worksheet
• 针对嵌入到工作表中的图表的自定义页面设置
• List settings for ListBoxes and ComboBoxes from the Forms toolbar
• 窗体工具栏中的列表框和组合框的列表设置
• Conditional formatting that is stored on an XLM macro sheet
• 保存在XLM宏工作表中的条件格式
Also, shared workbooks will no longer be shared. The "Value (Y) axis crosses at category number" setting on the Scale tab of the Format Axis dialog box is not saved if the "Value (Y) axis crosses a maximum category" checkbox is checked. The "Vary colors by point" setting in the Format Data Series dialog box is not saved if the chart contains more than one data series.
Finally, try opening your file and saving it in SYLK (.slk, for symbolic link) format. Note that when you save a workbook in this format, only the active worksheet is saved. So, you will have to do the same for each worksheet. Reopen the file and save it in a desired format such as .xls.
最后,试着打开文件,另存为SYLK格式(.slk, symbolic link符号链接)。注意当将工作簿另存为这种格式时,只有活动工作表被另存,因此,需要对每个工作表执行相同操作。重新打开这个YLK格式文件,另存为需要的格式,比如.xls.
If You Cannot Open Your File
如果不能打开文件
If your workbook is corrupt to the point that you cannot even open it, open your spreadsheet in Microsoft Word or via the Spreadsheet viewer, which can be downloaded from the Microsoft web site, then copy your data from the open file. Much of your formatting, formulas, etc., will, however, be lost.
如果工作簿损坏到甚至不能用EXCEL打开,用MS Word或Spreadsheet viewer(表格浏览器)打开, Spreadsheet viewer(表格浏览器)可从微软的网站上下载。然后从打开的文件中拷贝数据,然而很多格式和公式等等会丢失。
Next, open a new workbook and create an external link to the corrupt workbook—e.g., ='C:\Documents and Settings\Raina\My Documents\[ChookSheet.xls]Sheet1'!A1. Copy this link down as many rows and across as many columns as needed. Do the same for each worksheet in the workbook. If you cannot remember any of the names of the worksheets, create any old sheet name using the correct filename path, and Excel will display the sheet names for you when you press Enter.
下一步,打开一个新工作簿,在A1单元格内建立一个指向损坏工作簿的外部链接-例如“='C:\Documents and Settings\Raina\My Documents\[ChookSheet.xls]Sheet1'!A1. 向下复制和向右复制所需的多行多列。工作簿中的每个工作表执行相同操作。如果没记住工作表名,工作簿名路径正确的情况下使用任意旧的工作表名,EXCEL会在按ENTER键时显示工作表名。
One final thing you can do is visit the OpenOffice.org web site and download the free version of OpenOffice.org. Except for different names for different tools and commands, OpenOffice.org is very similar to Excel. OpenOffice.org is based on the same basic spreadsheet structure as Excel, making it simple for Excel users to use. In fact, about 96% of the formulas used in Excel can be created and applied by using the spreadsheet in OpenOffice.org.
一个最后可以做的事情是访问OpenOffice.org网址,下载OpenOffice.org的免费版,除不同的工具和命令有不同的名称之外,OpenOffice.org与EXCEL非常相似。OpenOffice.org基与同EXCEL相同的电子表格结构,对于EXCEL用户来说易于使用。事实上,EXCEL中96%的公式可以在OpenOffice.org表格建立和使用。
To download the free version of OpenOffice.org, go to http://download.openoffice.org/index.html and download it from the FTP site of your choice. Then install the program. OpenOffice.org is also available for Macs.
要下载免费版OpenOffice.org,访问网址http://download.openoffice.org/index.html, 根据读者的选择可以自FTP网站上下载,接着安装软件。OpenOffice.org 也有适用于苹果机的版本。
In many cases, your Excel data can be recovered. However, no VBA code can be recovered due to incompatibility between OpenOffice.org and Excel.
在很多情况下,EXCEL数据可以恢复。然而因为OpenOffice.org 和 Excel的不兼容,VBA代码不可恢复。
Sadly, if none of these methods works, you probably will have to pay to try to have your workbook recovered with special software. One source where such reputable software (for Windows) can be purchased belongs to the authors of this book and is located at http://www.ozgrid.com/Services/corrupt-file-recovery-index.htm.
郁闷的是,如果这些方法都不见效,就很可能不得不花点银子使用专用软件进行修复。可供购买象这样著名的软件(用于WINDOWS)的一个资源属于本书的作者组,位于http://www.ozgrid.com/Services/corrupt-file-recovery-index.htm.
After purchase and installation, run the ExcelFix program. Click Select File, select a corrupt file, and then click Diagnose to recover the file. You should now see the recovered file in the workbook viewer. Click Save Workbook to save the workbook into a new readable file that you can open from Excel.
购买安装后,运行ExcelFix程序,点击选择文件(Select File),选择一个损坏的文档,然后点击诊断(Diagnose)来修复文档。应该在工作簿浏览器中看到已修复的文档。点击保存工作簿(Save Workbook)保存成一个新的可被EXCEL打开的文档。
Also available is a demo version that does not enable you to save the file, but all versions of the program enable you to start again and recover as many files as you want.
演示版没有保存已修复文档的命令,但是所有的版本允许再次开始来修复所需要的多个文档。
[ 本帖最后由 livewire 于 2008-12-13 12:23 编辑 ] |
|