Hi, I am trying to produce grouping rows similar to the attached grpexample.xlsx. note that there is a group header node that is like a summary node, but not calculated..I noticed the template I produced(grptemplate.xls) always have one row more...if I group row 7-row 16, the end will include row 17. Please help.
thanks,
Lin
my sample code would look like:
public static void main(String[] args)
{
Workbook wk = new Workbook();
Worksheet ws = wk.getWorksheets().getSheet(0);
for (int i = 0; i < 103; i++)
{
for (int j = 0; j < 2; j++)
{
ws.getCells().getCell(i, j).setValue("Dummy content");
}
}
ws.getOutline().setSummaryRowBelow(false);
ws.getCells().groupRows(7,16, false);
ws.getCells().groupRows(8, 16, false);
ws.getCells().groupRows(18,19, false);
ws.getCells().groupRows(19, 19, false);
ws.getCells().groupRows(21,22, false);
ws.getCells().groupRows(22, 22, false);
ws.getCells().groupRows(24,27, false);
ws.getCells().groupRows(25,27, false);
ws.getCells().groupRows(29,34, false);
ws.getCells().groupRows(30,34, false);
ws.getCells().groupRows(36,38, false);
ws.getCells().groupRows(37,38, false);
ws.getCells().groupRows(40,41, false);
ws.getCells().groupRows(41,41, false);
ws.getCells().groupRows(43,45, false);
ws.getCells().groupRows(44,45, false);
ws.getCells().groupRows(47,48, false);
ws.getCells().groupRows(48,48, false);
ws.getCells().groupRows(50,98, false);
ws.getCells().groupRows(51,98, false);
ws.getCells().groupRows(100,102, false);
ws.getCells().groupRows(101,102, false);
try{
wk.save("c:\\samples\\grptemplate.xls");
}catch(IOException e)
{
;
}
}