poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 61516] problem adjusting cell reference in formula to zeroth row
Date Tue, 19 Sep 2017 10:25:58 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=61516

Dragan Jovanović <drjovanovic@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #4 from Dragan Jovanović <drjovanovic@gmail.com> ---
Ok, I have simplified test case a bit (see  attachment 35334), now it does not
include variations on parameter values, and formula is now as trivial as it can
be.

"A" is reference to column, not row. A1 is [row0, cell0], as you can see in my
source code :
sheet.createRow(0).createCell(0).setCellValue(1); // A1

I am copying from row2 to row1, but these are not C and B (again, letters stand
for column references), these are rows marked as 3 and 2 in common spreadsheet
editors.

Further, that means that cell reference from formula should shift one row up,
that is, A1 becomes A0 (which is undefined, and excel writes it as "#REF!").
You can check this if you open attached xlsx file (attachment 35335) in
spreadsheet editor, and copy cell C3 to C2.

To resume :
- if you open atached file rowShiftExample.xlsx in Excel, and manually copy C3
to C2, you'll get value #REF! In C2;
- if you execute attached application (attachment 35334) which should do the
same thing, you'll get result “A” in variable shiftedFmla.

I hope it is more clear now.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message