We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Problem with group:merge smart marker - Aspose. Invalid end row index exception

Hi!

There is a problem with using “group:merge” smart marker ( Aspose.Cell 4.8.0) if dataset has only 1 row:

Code:

DataTable dt = new DataTable("Rows");

dt.Columns.Add(new DataColumn("field1", typeof(string)));

DataRow dr = dt.NewRow();

dr["field1"] = "test";


dt.Rows.Add(dr);


WorkbookDesigner designer = new WorkbookDesigner();

//Non merged - OK

designer.Workbook.Open(@"..\..\NonMerge.xls");

designer.SetDataSource(dt);

designer.Process(true);

designer.Save(@"..\..\NonMergeOut.xls", FileFormatType.Default);


//Group merging - ERROR !!! Aspose. Invalid end row index exception

designer.Workbook.Open(@"..\..\Merge.xls");

designer.SetDataSource(dt);

designer.Process(true);//Generate exception

<span style=“font-size: 10pt; font-family: “Courier New”;” lang=“EN-US”>
designer.Save(@"…\MergeOut.xls",
FileFormatType.Default);

Templates in attachment

Thanks, Evgeny

Hi,

Please try the attached version as I have tested using your template file and code with it, it works fine.

Thank you.

Hi!


Thanks, it worked



Regards, Evgeny