Boa tarde a todos, estive usando o POI. Estive pesquisando como mesclar celulas e na página oficial diz para mim fazer assim:
[code] Workbook wb = new HSSFWorkbook();
Sheet sheet = wb.createSheet(“new sheet”);
Row row = sheet.createRow((short) 1);
Cell cell = row.createCell((short) 1);
cell.setCellValue("This is a test of merging");
sheet.addMergedRegion(new CellRangeAddress(
1, //first row (0-based)
1, //last row (0-based)
1, //first column (0-based)
2 //last column (0-based)
));
// Write the output to a file
FileOutputStream fileOut = new FileOutputStream("workbook.xls");
wb.write(fileOut);
fileOut.close();[/code]
http://poi.apache.org/spreadsheet/quick-guide.html (Merging Cells).
No entanto o construtor CellRangeAddress(int, int, int int) está marcado como deprecated.
Alguém conhece alguma outra forma de mesclar celulas sem utilizar um metodo deprecated?