You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2020/04/15 10:59:55 UTC
[Bug 54751] Add levels to groupRow
https://bz.apache.org/bugzilla/show_bug.cgi?id=54751
--- Comment #1 from Eugene Kortov <ko...@gmail.com> ---
Hi, I checked on Poi 4.1.1 and doesn't have such behaviour with this code
(added a screenshot "Screenshot from 2020-04-15 14-55-04.png")
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import java.io.FileInputStream;
import java.io.FileOutputStream;
class ExcelGroupColumns {
public static void main(String[] args) throws Exception{
Workbook workbook = new XSSFWorkbook();
Sheet sheet = workbook.createSheet("Sheet1");
for (int rowNum = 0; rowNum < 6; rowNum++) {
Row row = sheet.createRow(rowNum);
for (int i = 0; i < 25; i++) {
Cell cell = row.createCell(i);
cell.setCellValue("Col" + rowNum + " " + i);
}
}
sheet.groupRow( 0, 5 );
sheet.groupRow( 1, 4 );
sheet.groupRow( 2, 3 );
FileOutputStream out = new FileOutputStream("Test_1.xlsx");
workbook.write(out);
out.close();
workbook.close();
}
}
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org