Message-ID: <1438902760.9179.1711678839237.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_9178_1574123279.1711678839237" ------=_Part_9178_1574123279.1711678839237 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
ExcelTemplate Grouping and Nesting allows users to bind flat data to a s= pecially formatted spreadsheet with the data being displayed in a grouped o= r nested format. To learn how to create a template for Grouping and Nesting= , see our in-depth tutorai Using Grouping and Nesting with ExcelTemplate.<= /p>=20
=20public class GroupingAndNesting { /// <summary> /// Build the report with ExcelTemplate /// </summary> public void GenerateReport() { //--- Create a new ExcelTemplate object and open a template fil= e ExcelTemplate xlt =3D new ExcelTemplate(); //Open the template xlt.Open(@"..\..\ExcelTemplateFiles\GroupingAndNestingTemp= late.xlsx"); //--- Fill the dataset with the data from the CSV file DataSet ds =3D GetCSVData(@"..\..\ExcelData\GroupingandNes= tingData.CSV"); //--- Bind the data to the template file and save it. xlt.BindData(ds, "Data", xlt.CreateDataBindingPropert= ies()); xlt.Process(); xlt.Save(@"..\..\ExcelOutputFiles\GroupingandNesting_outpu= t.xlsx"); } //Parse the data from the CSV file System.Data.DataSet GetCSVData(string csvFileName) { DataSet ds; using (GenericParserAdapter parser =3D new GenericParserAdapter= (csvFileName)) { parser.ColumnDelimiter =3D ','; parser.FirstRowHasHeader =3D true; ds =3D parser.GetDataSet(); } return ds; } }=20