0

我从朋友那里得到了一个 .xls 文件。当我尝试在excel中打开它时,它打开得很好。但是当我尝试在写字板中打开同一个文件时,它使用如下表格标签显示文件内容:

<table border=1 cellspacing="0" cellpadding="0" width="580">
<style>

        <!--table

        .xl31

        {mso-style-parent:style0;

        mso-number-format:"\@";

        text-align:left;

        border-top:none;

        border-right:.5pt solid black;

        border-bottom:.5pt solid black;

        border-left:none;

        white-space:normal;}

        --> 
        <tr><td> By _______________ </td><td colspan=2 > By ____________ </td></tr>

        <tr><td>(Authorized  Signature) </td><td colspan=2 >  (Authorized  Signature)</td></tr>

        </table></th></tr> 
</table>

但是当我使用 microsoft office-2003 创建一个 excel 文件并在写字板中打开它时,它会显示一些垃圾数据。有人可以帮我找出这些文件之间的区别吗?

4

1 回答 1

3

在许多 Web 应用程序中,通过将数据格式化为 HTML 表格并将其与将内容描述为 Excel 文件的标题一起发送来“作弊”并创建 Excel 下载,这是一种常见的做法。Excel 仍将呈现数据正常,以为它可能会抱怨下载中的内容看起来不像真正的 Excel 文件。

That's likely how your friend got that file. If you try it with an Excel file you created from Excel its either going to be binary (xls) or a zipped up set of XML files (2007+) so its not going to have any content you can read directly using Wordpad.

于 2012-08-08T15:08:50.700 回答