Answer the question
In order to leave comments, you need to log in
Apache POI+Excel, how to split into parts?
Good afternoon. I am writing a program, the essence is this:
There is a large XLS file with a single sheet. It has a lot of data on it.
It is required to cut it into pieces (cut into pieces vertically).
The problem is this: When copying cells, styles, height, width, values are transferred, but at the output we get a document without merged cells.
Here is the code to access all MergedRegions
for (int n = 0; n < sheet.getNumMergedRegions(); n++) {
CellRangeAddress mergedRegion = sheet.getMergedRegion(n);
// Just add it to the sheet on the new workbook.
sheet_out.addMergedRegion(mergedRegion);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question