Bug 42016 - Incorrect formula with auto-fill cells (shared formula)
Summary: Incorrect formula with auto-fill cells (shared formula)
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.0-dev
Hardware: Other other
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2007-04-01 21:11 UTC by Khanh Tran
Modified: 2014-07-28 19:11 UTC (History)
0 users

This is the simple testcase that the bug occured on (13.50 KB, application/octet-stream)
2007-04-01 21:15 UTC, Khanh Tran

Note You need to log in before you can comment on or make changes to this bug.
Description Khanh Tran 2007-04-01 21:11:56 UTC
When the spreadsheet contains more than 6 shared formula cell, the 
getCellFormula function return incorrect result:
  -C1: A$1+B$1
  -C2 from C2: drag from C1 (autofill)
  - using POI to get cells formula:
    C1: A$1+B$1: fine
    C2: A$2+B$2: OPPS!
    C3: A$3+B$3: OPPS!

The expected result is A$1+B$1 for all C1..C7 cells.
The problem occurs for all POI versions.
Please help me to solve this. All my livehood depend on this. Thanks.
Comment 1 Khanh Tran 2007-04-01 21:15:46 UTC
Created attachment 19865 [details]
This is the simple testcase that the bug occured on
Comment 2 Nick Burch 2008-01-25 08:39:04 UTC
Some fixes for shared and relative formula references have been committed in the
last few weeks

Could you please re-try with a recent svn checkout from trunk, and see if the
problem still remains?
Comment 3 Dominik Stadler 2014-07-28 19:11:43 UTC
This seems to have been fixed, a simple unit test added with r1614135 using the given xls-file shows that it works with latest trunk.