Created attachment 30102 [details] Group row multilevel I need to show my information into different row levels using the function groupRow sheet.groupRow( 0, 5 ) sheet.groupRow( 1, 4 ) sheet.groupRow( 2, 3 ) -0 --1 ---2 ---3 --4 -5 Actually all rows have the same group in the first level Expected behavior in the attachment
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(); } }
Created attachment 37173 [details] Bug not reproduced
neen your info