FIX: "File error: Data may have been lost" error message when you use Excel 2010 to open an Excel report file that was exported from SSRS 2008, from SSRS 2008 R2 or from SSRS 2012

Article translations Article translations
Article ID: 2554905 - View products that this article applies to.
Expand all | Collapse all

On This Page

Microsoft distributes Microsoft SQL Server 2008, Microsoft SQL Server 2008 R2 or Microsoft SQL Server 2012 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008, SQL Server 2008 R2or SQL Server 2012 fix release.

Symptoms

Consider the following scenario. You use Microsoft SQL Server 2008 Reporting Services (SSRS 2008), Microsoft SQL Server 2008 R2 Reporting Services (SSRS 2008 R2) or Microsoft SQL Server 2012 Reporting Services (SSRS 2012) to export a report to a Microsoft Excel workbook file. Then, you use Microsoft Excel 2010 to open the Excel workbook file. In this scenario, you receive the following error message in a dialog box:
File error: data may have been lost.


Notes
  • This issue does not occur if you use Microsoft Office Excel 2003 or Microsoft Office Excel 2007 to open the workbook file.
  • This issue does not occur if you save the file as an Excel 2010 workbook file.

Cause

This issue occurs because SSRS 2008, SSRS 2008 R2 or SSRS 2012 writes a negative zero (-0) value to the Excel workbook when you export the report. When you open the Excel workbook, Excel 2010 checks the value and generates the error message after the value is found.

Resolution

Cumulative update information

SQL Server 2008 R2 Service Pack 2

The fix for this issue was first released in Cumulative Update 1 for SQL Server 2008 R2 Service Pack 2. For more information about how to obtain this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:
2720425 Cumulative Update package 1 for SQL Server 2008 R2 Service Pack 2
Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 R2 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
2730301 The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 Service Pack 2 was released

SQL Server 2012

The fix for this issue was first released in Cumulative Update 2 for SQL Server 2012. For more information about this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:
2703275 Cumulative update package 2 for SQL Server 2012
Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2012 fix release. Microsoft recommends that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
2692828 The SQL Server 2012 builds that were released after SQL Server 2012 was released
You must apply a SQL Server 2012 hotfix to an installation of SQL Server 2012.

SQL Server 2008 R2 Service Pack 1

The fix for this issue was first released in Cumulative Update 6 for SQL Server 2008 R2 Service Pack 1. For more information about how to obtain this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:
2679367 Cumulative Update package 6 for SQL Server 2008 R2 Service Pack 1
Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 R2 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
2567616 The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 Service Pack 1 was released

SQL Server 2008 R2

The fix for this issue was first released in Cumulative Update 13. For more information about how to obtain this cumulative update package for SQL Server 2008 R2, click the following article number to view the article in the Microsoft Knowledge Base:
2679366 Cumulative Update package 13 for SQL Server 2008 R2
Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 R2 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
981356 The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 was released

SQL Server 2008 Service Pack 3

The fix for this issue was first released in Cumulative Update 4 for SQL Server 2008 Service Pack 3. For more information about how to obtain this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:
2673383 Cumulative update package 4 for SQL Server 2008 Service Pack 3
Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
2629969 The SQL Server 2008 builds that were released after SQL Server 2008 Service Pack 3 was released

Workaround

To work around this issue, do not use negative zeros.

For example, you can use an expression that resembles the following when you calculate the value of a text box in SSRS 2008:
=IIf(Sum(Fields!Amount.Value) = -0, 0, Sum(Fields!Amount.Value))

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Properties

Article ID: 2554905 - Last Review: August 1, 2012 - Revision: 5.0
Applies to
  • Microsoft SQL Server 2008 Reporting Services
  • Microsoft Excel 2010
  • Microsoft SQL Server 2008 R2 Reporting Services
  • Microsoft SQL Server 2012 Developer
  • Microsoft SQL Server 2012 Enterprise
  • Microsoft SQL Server 2012 Standard
  • Microsoft SQL Server 2012 Web
Keywords: 
kbqfe kbfix kbexpertiseadvanced kbsurveynew KB2554905

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com