Reputation: 482
I have implemented custom user grid in cmsdesk adminstration section. I have added custom page as Unigrid.ascx for binding dataset.
A have added Query in User_List.aspx page as
<cms:UniGrid ID="gridElem" Query="cms.user.SelectCustomUserSearch" runat="server" GridName="User_List.xml" OrderBy="UserName"
IsLiveSite="false" />
on custom UniGrid.ascx.cs page bind dataset in RetrieveData()
method as
ds = ConnectionHelper.ExecuteQuery(Query, parameters);
searching, paging , sorting is working fine. but when I export to excel it is get empty excel sheet.
how can I write excel with custom UniGrid.ascx control.
Thanks
Upvotes: 0
Views: 588
Reputation: 7696
here are the options you have:
Debug AdvancedExport.ascx.cs which ensures the export functionality. It also contains UniGridExportHelper - check its public property DataSource. If it's null the problem will be in retrieving data (where condition / top n etc.), if it won't the data might be corrupted (stripped of html etc.)
Download Open XML SDK Tool and check whether the excel is really empty. (Check shared string table etc.)
If you have source code you can debug directly the UniGridExportHelper.
Check other formats - CSV / XML - are they also empty?
Upvotes: 2