This is a migrated thread and some comments may be shown as answers.

Error exporting to Excel: "Excel was able to open the file..."

9 Answers 200 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kirby Haltom
Top achievements
Rank 1
Kirby Haltom asked on 20 Apr 2009, 10:01 PM
Has anyone else had a problem exporting a report to Excel that generated a dialog box that reads:

Errors were detected in '[filename]', but Microsoft Office Excel was able to open the file by making the reports listed below. Save the file to make the changes permanent.

Damage to the file was so extensive that repairs were not possible. Excel attempted to recover your formulas and values, but some data may have been lost or corrupted.


I am building a report programmatically, not using the designer. But it is a simple, tabular report, and exports perfectly to all the other formats.

The version of Telerik reports is Q2 2008.

Has anyone seen this before?

Thanks,
Kirby

9 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 21 Apr 2009, 11:19 AM
Hello Kirby,

How do you export the report - are you using the export button from the report viewer or are you doing it programmatically? Also what is the operating system and MS Office version that you use? Do you receive errors in excel if you export from our report demos available here?
Any additional information that you consider relevant would be highly appreciated.

All the best,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Kirby Haltom
Top achievements
Rank 1
answered on 21 Apr 2009, 02:22 PM

(I was hoping this was some simple, easily recognized user-error problem. Oh, well. :)

  • I am using the export button.
  • I am checking it on Microsoft Excel 2003 running on Windows XP. Every report that I have built using the designer has exported without issue.
  • I can open the reports on the demo page fine.

The reports are simple. After I create a header and footer and detail, I loop through a list of column descriptions, adding the columns to the details. The report looks and works great, and exports fine to all other formats other than excel.

This is a condensed version of the code that adds columns:

 
double dbLeft = 0;   
Telerik.Reporting.Drawing.Unit height = new Telerik.Reporting.Drawing.Unit(.20, Telerik.Reporting.Drawing.UnitType.Inch);   
for(int i = 0; i < ColumnList.Count; i++)   
{  
 ReportColumnDescription column = ColumnList[i];    //a ReportColumnDescription has the width and format, etc.  
 Telerik.Reporting.Drawing.Unit columnWidthUnit = new Telerik.Reporting.Drawing.Unit (column.columnWidth, Telerik.Reporting.Drawing.UnitType.Inch);   
 Telerik.Reporting.TextBox detailbox = new Telerik.Reporting.TextBox();   
 Telerik.Reporting.TextBox headerbox = new Telerik.Reporting.TextBox();  
   
 detailbox.Width = columnWidthUnit ;  
 detailbox.Height = height;   
 detailbox.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(dbLeft, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.0, Telerik.Reporting.Drawing. UnitType.Inch));   
   
 
  headerbox.Width = columnWidthUnit ;  
 headerbox.Height = height;   
 headerbox.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(dbLeft, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.0, Telerik.Reporting.Drawing. UnitType.Inch));   
 
    detailbox.Value = column.ValueFormat;   
    headerbox.Value = column.DisplayName;  
 
    Detail.Items.Add(detailbox);  
    HeadingSection.Items.Add(headerbox);  
 
    dbLeft += column.columnWidth;  
}  
 

 

0
Steve
Telerik team
answered on 24 Apr 2009, 11:19 AM
Hi Kirby,

Unfortunately your code did not help in reproducing the problem and the fact that all other formats are ok (including rtf) is also very strange. Please open a support ticket, zip and attach a working sample that shows the issue at hand. Once we review it we would be able to provide more info on the matter.

Kind regards,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Melchor
Top achievements
Rank 2
answered on 06 May 2010, 07:35 PM
I have the same problem.  I found out that service pack 3 (S3) was the cause of the error. 
0
Steve
Telerik team
answered on 11 May 2010, 07:44 AM
Hi Melchor,

We have not released service pack 3 for any recent Reporting version - are you by any chance referring to Q3 2009? In such case is it working well with the latest official release? Any additional information on the matter would me highly appreciated.

Kind regards,
Steve
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
ALi
Top achievements
Rank 1
answered on 01 Jul 2012, 09:18 AM
Hi Steve I Have Error In Exporting Report To Pdf  Or Print this Report In web Application

The Error is :
An error has occurred while processing Table 'table1':
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index 
0
Steve
Telerik team
answered on 02 Jul 2012, 08:18 AM
Hello Ali,

This is a generic error that could happen due to various reasons and without a runnable report that exhibits the problem, we cannot offer any concrete suggestions. It would be best if you attach a sample project so we can review it locally and advise you.

Regards,
Steve
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
Brad
Top achievements
Rank 1
answered on 09 Apr 2014, 01:18 PM
Have we found a solution to this? I'm using the latest and greatest version of Reporting and still getting this error.
0
Nasko
Telerik team
answered on 14 Apr 2014, 06:56 AM
Hello Brad,

There may be different reasons for seeing this message in Excel. In order to help you further, please open a support ticket where you can provide more details, such as your report definition, screenshots, etc., so we can review them locally and advise accordingly.

Regards,
Nasko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Kirby Haltom
Top achievements
Rank 1
Answers by
Steve
Telerik team
Kirby Haltom
Top achievements
Rank 1
Melchor
Top achievements
Rank 2
ALi
Top achievements
Rank 1
Brad
Top achievements
Rank 1
Nasko
Telerik team
Share this question
or