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

[Solved] ExcelML option doesnt work.

3 Answers 198 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Diego
Top achievements
Rank 1
Diego asked on 05 Jun 2008, 04:33 PM
Hi!

Im trying to set up a simple Excel export using radgrid. I'm able to export to csv format, pdf, and excel with the Html option. When I try to use ExportToExcel with ExcelML I get  the headers and all the rows are empty.

I tried using an XmlDataSource, then I tried using OnNeedDataSource and setting this to a simple array. Still, I can export to all the formats except ExcelML.

I set the RadGrid1_ExcelMLExportRowCreated event and all the e.Row.Cells are empty.

Any Idea what can be wrong?

3 Answers, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 06 Jun 2008, 07:50 AM
Hello Diego,

Can you please see if the ExcelML export from the following demo functions properly on your end?

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/GeneralFeatures/Exporting/DefaultCS.aspx

If so, please review the implementation. I hope this helps!

Regards,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Diego
Top achievements
Rank 1
answered on 06 Jun 2008, 01:39 PM
Hi Konstantin

Thank you for your answer. The example in the link above works fine, but I still have the problem... I have tried all the different combinations in the properties but still, all the export methods work fine, except the ExcelML

I have isolated the code...

I have something like this in the .aspx
...
</asp:ScriptManager>
                <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" AjaxEnabled="True">
                    <AjaxSettings>
                        <telerik:AjaxSetting AjaxControlID="rgList">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="rgList" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
                </telerik:RadAjaxManager>
                    <b>Select Category</b><br />
                    <br />
                <telerik:radgrid id="rgList" onneedDataSource="NeedDataSource" allowsorting="True" allowpaging="False"
                    pagesize="10" skin="Inox" runat="server" gridlines="None" width="95%" onexcelmlexportstylescreated="RadGrid1_ExcelMLExportStylesCreated"
                    onexcelmlexportrowcreated="RadGrid1_ExcelMLExportRowCreated">
                <MasterTableView Width="100%"></MasterTableView>
                <PagerStyle Mode="NumericPages"></PagerStyle>
                </telerik:RadGrid>               
                <asp:Button ID="ExportButton" OnClick="Export1" runat="server" Text="Button" />
...
The Code Behind file is almost the same that the one in your example. The only thing different is the databinding (im using the NeedDataSource Event). And for testing purposes im binding an array. Is the ExcelML supported no matter the DataSource I use?
0
Konstantin Petkov
Telerik team
answered on 09 Jun 2008, 01:38 PM
Hi Diego,

I was able to replicate the problem locally thanks to your explanation. Please, set the master table property UseAllDataFields to be able to resolve the error:

<MasterTableView UseAllDataFields="true"></MasterTableView>

Kind regards,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Diego
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
Diego
Top achievements
Rank 1
Share this question
or