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

Problems exporting to Excel 97-2003

3 Answers 99 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Michael Maddux
Top achievements
Rank 1
Michael Maddux asked on 10 Aug 2010, 03:55 PM
We use code like the following...

 

 

public void SaveToExcel(Stream fileStream)

 

{

 

 

    GridViewExportOptions exportOptions = new GridViewExportOptions();

 

    exportOptions.Format =

 

ExportFormat.ExcelML;

 

    exportOptions.ShowColumnHeaders =

 

true;

 

    exportOptions.Encoding =

 

Encoding.UTF8;

 

 

 

 

    using (fileStream)

 

    {

 

 

        if (fileStream.CanWrite)

 

        Export(fileStream, exportOptions);

    }

}

First scenario:

When the user uses this, he gets a dialog box that offers one file type - Excel 97-2003. (in ExcelML)
The file is saved and appears on disk as an xls file.
The user opens the file in Excel 2003 (no warnings from Excel) and creates a pivot table.
User clicks "Save" - Excel gives no warnings.
User closes Excel.  File still appears on disk as an xls file.
User starts Excel and opens file:  Receives message that there was a problem with a pivot table.  Pivot table is gone and user has lost hours of work.

**************************************

Second scenario:

User exports another GridView to a new file.
Opens file in Excel 2003 (no warnings)
User creates pivot table.
User clicks "Save As" (instead of "Save")
User choses to save in xls format.
Closes Excel.
Opens Excel and opens the file - no warnings and the pivot table is there.  File is unharmed.


So there is a workaround but the users don't like it very much, and there's still too much potential for error.

Thanks,

Mike

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 10 Aug 2010, 04:06 PM
Hello Mike,

 Not all features are supported in ExcelML format - MS Excel can save complex documents only in binary of XLSX format.

Kind regards,
Vlad
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
Michael Maddux
Top achievements
Rank 1
answered on 16 Aug 2010, 04:48 PM
Thanks for your response!

Since the xml format for Excel 2003 does not support advanced features, does Telerik have any plans to support exporting to Excel 2003 NATIVE format?  Our users are slow in adopting new tools, and have only recenlty upgraded to Office 2003!

Thanks,

Mike
0
Vlad
Telerik team
answered on 16 Aug 2010, 04:54 PM
Hi Mike,

 We have plans to add native XLSX support however this most probably will be available officially next year. 

Greetings,
Vlad
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
Tags
GridView
Asked by
Michael Maddux
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Michael Maddux
Top achievements
Rank 1
Share this question
or