Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Excel Files Generated by 3rd Party Tools May Report Unreadable Content on Windows 7 or Windows 2008 R2


View products that this article applies to.

Symptoms

When you attempt to open an Excel 2003 format binary file that was generated by a third-party tool (such as a web app) on Windows 7, it may report "unreadable content" and offer to repair the file. Alternatively, you may receive an error that says,"The document is corrupt and cannot be opened. To try and repair it, use the Open and Repair command in the Open dialog box, and select Extract Data when prompted."

↑ Back to the top


Cause

The Excel 2003 file format includes an internal file allocation table to provide compound document functionality. Windows 7 includes an integrity check of the internal FAT, which is returning an error, indicating that the affected files were constructed improperly.

↑ Back to the top


Resolution

To resolve this issue, you should contact the 3rd-party vendor to see if they have a patch to correctly report the sector sizes for OLE Structure Storage binary files.


You can work around this issue by openining the files on a Windows XP machine and saving them in Excel. This will correct the file structure and allow them to be opened on Windows 7 machines.

↑ Back to the top


More information

If you are a developer who is seeing this problem with OLE Structure Storage files you produce, you should ensure that your code produces the standardized output in these key areas:

In a compound file, all sector chains MUST contain valid sector numbers, less�
than or equal to MAXREGSECT (0xFFFFFFFA). In a sector chain, the last sector's next
pointer MUST be ENDOFCHAIN (0xFFFFFFFE).


DIFAT Sectors: A special value of ENDOFCHAIN (0xFFFFFFFE) is stored in "Next DIFAT Sector�
Location" field of the last DIFAT sector, or in the header when no DIFAT sectors
are needed. Next DIFAT Sector Location (4 bytes): This field specifies the next
sector number in the DIFAT chain of sectors. The first DIFAT sector is specified in
the Header. The last DIFAT sector MUST set this field to ENDOFCHAIN
(0xFFFFFFFE).


MiniFAT sectors: If all of the user streams in the file are greater than the cutoff of 4096 bytes,�
then mini FAT and mini stream are not required. In this case, the header's first
mini FAT starting sector location can be set to ENDOFCHAIN, and the root directory
entry's starting sector location can be set to ENDOFCHAIN.

↑ Back to the top


Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

↑ Back to the top


Keywords: KB2411912, kbcorrupt

↑ Back to the top

Article Info
Article ID : 2411912
Revision : 1
Created on : 9/16/2010
Published on : 9/16/2010
Exists online : False
Views : 424