Summary: | setAsActiveCell doesn't (always) work | ||
---|---|---|---|
Product: | POI | Reporter: | rjahn <rene.jahn> |
Component: | HSSF | Assignee: | POI Developers List <dev> |
Status: | NEW --- | ||
Severity: | normal | CC: | holger.schackmann, vadimproga |
Priority: | P2 | ||
Version: | 3.15-FINAL | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows Vista | ||
Attachments: | Test files |
Description
rjahn
2014-02-06 17:08:05 UTC
I tried this with LibreOffice, it did display the active cell correctly. I did not have a MS Excel available. This was with the latest trunk version, I have added a unit-test for this at TestHSSFCell.testActiveCellBug56114() with r1577901. Please retry this with the latest version and re-open if it still does not work for you. Did a test with nightly build: poi-3.11-beta1-20140316.jar The problem still exists. Works with XSSF but not with HSSF. For someone who this affects, any chance you could: * Fire up Excel, and create a simple workbook, with a cell set as active (wb1) * Load that in POI, and save without making changes (wb2) * Load that in POI, change the active cell, save (wb3) * Load that in Excel, change the active cell, save (wb4) Then, use tools like hssf.dev.BiffViewer to see what record(s) Excel is using for the active cell, and what options / values on those records, and what POI is doing differently. There will be some small differences between the files normally, which hopefully diffing things like wb1 and wb2 will allow excluding of, it's the parts around the active cell that need narrowing down to fix Created attachment 32136 [details]
Test files
wb1.xls (created with Excel)
wb2.xls (read with POI, written with POI)
wb1_wb3.xls (wb1 was the base for wb3) (read with POI, written with POI)
wb2_wb3.xls (wb2 was the base for wb3) (read with POI, written with POI)
wb2_wb3_wb4.xls (wb2_wb3 was the base for wb4) (created with Excel)
Tests files are attached. The poi-3.15 has the same bug. If you take the two xls-files created by excel that differ only in activeCell and re-save them by poi, the hssf.dev.BiffViewer shows no differences between files, but excel opens new-created files with the original cell location. |