Bug 52910 - Not Finding all Merged Regions in Worksheet
Summary: Not Finding all Merged Regions in Worksheet
Status: RESOLVED INVALID
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.8-dev
Hardware: PC Mac OS X 10.5
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-14 14:03 UTC by bscartine
Modified: 2016-06-15 09:56 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bscartine 2012-03-14 14:03:46 UTC
I am getting inconsistent results with the methods for getting merged cells in a worksheet, using the following code:


        for(int m=0;m<sheet.getNumMergedRegions();m++){
            CellRangeAddress addr =sheet.getMergedRegion(m);
            int[] coordinates = {addr.getFirstRow(),  addr.getFirstColumn(), addr.getLastRow(), addr.getLastColumn()};
            System.out.println(coordinates[0] + ":" + coordinates[1] + " - " + coordinates[2] + ":" + coordinates[3]);
          } 


I am getting .XLS files that were created on Windows PC as .XLSX and then saved as .XLS.  

When I then save the .XLS file on a Mac, then the API does find the merged cells.
Comment 1 bscartine 2012-03-14 14:06:53 UTC
To clarify, the POI API is not finding merged cells in the original XLS file that was created on Windows.  I opened the original XLS file in OpenOffice on a Mac, and saved to a new file, and then was able to get the merged cells using the POI API.
Comment 2 Dominik Stadler 2015-05-31 22:19:36 UTC
Is this bug still active? Can you attach a sample file that allows to reproduce this?
Comment 3 Javen O'Neal 2016-06-15 09:56:18 UTC
No response. Closing the bug as invalid.

If you still have this problem in the latest release of POI, please reopen and attach a file that demonstrates the problem.