Import gridview Template to worksheet

I want to import nested gridviews to worksheet, but it only imports the parent gridview:


<asp:GridView ID=“gvParent” runat=“server” AutoGenerateColumns=“False” ShowHeader=“False”>
<asp:BoundField DataField=“ID” HeaderText=“ID”></asp:BoundField>
<asp:GridView ID=“gvChild” runat=“server” Width=“100%” AutoGenerateColumns=“False” ShowHeader=“False”
DataSource=‘<%# GetChildRelation(Container.DataItem,“rlCounty”) %>’>
<asp:BoundField DataField=“County” HeaderText=“County”></asp:BoundField>
<asp:BoundField DataField=“Name” HeaderText=“Name”></asp:BoundField>
</asp:GridView>
</asp:TemplateField>
</asp:GridView>


vb.net:
workbook.Worksheets(0).Cells.ImportGridView(gvParent, 8, 0, ImportOptions)

Hi,


Thanks for your posting and using Aspose.Cells for GridWeb.

Please share with us your sample project. Probably, this feature is not supported. We will execute your project at our end and log this issue in our database for investigation. We will look into it and fix it or support it if feasible. Thanks for your cooperation in this regard and have a good day,

this my vb.net code:


gvParent.DataSource = dtTable
gvParent.DataBind()

'Importing gvParent into Worksheet(1)

Dim ImportOptions As ImportTableOptions = New ImportTableOptions()
With ImportOptions
.IsFieldNameShown = False
.IsHtmlString = False
.ConvertNumericData =
.ConvertGridStyle = False
End With

workbook.Worksheets(1).Cells.ImportGridView(gvParent, 8, 0, ImportOptions)




workbook.Save(Page.Response, reportName + “.xlsx”, ContentDisposition.Attachment, New OoxmlSaveOptions())

Hi,


Thanks for your sample code and using Aspose.Cells.

We will look into this issue and update you asap.

Hi,


Thanks for using Aspose.Cells.

We have tested this issue with the attached sample project and found, import of gridview is working fine. However, for nested gridview, we need your sample project. Please download our provided sample project and either add your own aspx page or modify the existing one and re-submit it to us. We will then look into it and log this issue in our database for product team consideration and implementation in later releases.

I have also attached the screenshot showing the output of the sample project when it is executed and the output excel file generated by it for your reference.