Displaying recordsets vertically and skipping rows...possible?


#1

Hi, I’m evaluating the software and I have a very tough question. I’m not sure its even possible, but I wanted to ask…

I have 3 or 4 arrays of data that I need ouput. Would it be possible to export data using SmartMakers in the format as described below:

Title[0]
Description[0]
Keywords[0]

*
*skip 3 rows
*

Title[1]
Description[1]
Keywords[1]

*
*skip 3 rows
*

Title[2]
Description[2]
Keywords[2]

and so on…


#2

Yes, this feature is supported. Please check http://www.aspose.com/Wiki/default.aspx/Aspose.Excel/SmartMarker.html for reference.

The following is my sample code. And the attached file is a designer spreadsheet with smart markers.

ExcelDesigner designer = new ExcelDesigner();
designer.Open("d:\\test\\book1.xls");

DataTable dt = new DataTable("Test");
dt.Columns.Add("Title");
dt.Columns.Add("Description");
dt.Columns.Add("Keywords");


DataRow dr = dt.NewRow();
dr[0] = "A1";
dr[1] = "ABC1";
dr[2] = "Key1";
dt.Rows.Add(dr);

dr = dt.NewRow();
dr[0] = "A2";
dr[1] = "ABC2";
dr[2] = "Key2";
dt.Rows.Add(dr);

dr = dt.NewRow();
dr[0] = "A3";
dr[1] = "ABC3";
dr[2] = "Key3";
dt.Rows.Add(dr);

designer.SetDataSource(dt);
designer.Process();

designer.Save("abc.xls", SaveType.OpenInExcel, FileFormatType.Default, this.Response);