Is it possible to export a master detail grid to excel with Aspose.cell?
In my dataset , I have two table , one for the master and one for the detail.
You can use you own code to populate data in your dataset into Excel file with Aspose.Cells. Aspose.Cells is flexible enough to allow you to do that.
I have added a relation for my dataset, but I do not know how to build the excel template.
For example, this is What I have in my excel template::
&=childTable.nameproduct | &=childTable.productprice | &=childTable.color
But the result shows first the list of all categoryproduct(parentTable) and then the list of all childTable.
Thanks for your assistance
Smart marker feature doesn't support this master-child relationship.
You can populate child table data first then insert the master table at the appropriate position.
I am sorry but I really do not get it.
How should I populate the excel spreadsheet?
I fill my dataset this way:
Then this is how I populate the spreadsheet:
this.dataTable1 = new DataTable();
Excel excel = new Excel();
string path = MapPath(".");
string designerFile = path + "\\test.xls";
Worksheet sheet = excel.Worksheets;
sheet.Cells.ImportDataTable(this.dataTable1, false, 6, 1);
sheet.Name = "Products List";
while(excel.Worksheets.Count > 1)
excel.Worksheets.RemoveAt(excel.Worksheets.Count - 1);
excel.Save("AlphabeticalList.xls", SaveType.OpenInBrowser, FileFormatType.Default, this.Response);
The result I get is: the list of all the parent and then the list of all the child
I would like the following:
banana $10 5lb
orange $ 6 2lb
chicken $20 10lb
turkey $30 5lb
Slamon $50 $15
What method should I then use to populate the escel spreadsheet?
I think there isn't a simple approach to serve your need.
You have to loop through your datatables and use PutValue method to populate data cell by cell according to the relationship in your data tables.
I will consider if we can enhance smart marker feature to serve your need. However, I think it's complex and I don't have ideas on a direct solution.
Has this functionality been added for the smart marker?
Thanks for your help
Sorry, this feature is not added yet.
Just checking if this funcitonality has been added yet
We are still working on this feature.
We will add it to Aspose.Cells for Reporting Services first then port it to Aspose.Cells for .Net.