Bug 61869 - Setting cell formula produces an unreadable file
Summary: Setting cell formula produces an unreadable file
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: SS Common (show other bugs)
Version: 3.17-FINAL
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
: 60227 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-12-07 11:07 UTC by Luca
Modified: 2017-12-21 13:53 UTC (History)
1 user (show)



Attachments
Input file and test class (6.34 KB, application/x-zip-compressed)
2017-12-07 11:07 UTC, Luca
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luca 2017-12-07 11:07:24 UTC
Created attachment 35591 [details]
Input file and test class

Summary: if you have multiple rows with a formula and you change the formula content of 2 or more rows the result is an unreadable file.

Run attached Test2.java (just change the package name) on test.xlsx. Result is an 
unreadable file.
Comment 1 Yegor Kozlov 2017-12-20 16:33:49 UTC
Fixed in r1818818

In your spreadsheet C2 is a shared formula which spans into C2:C3. The concept of 'shared formula' means that the formula definition is stored in C2 and C3 references it by an internal index. When POI updated the formula in C2 it broke the shared formula relationship and Excel was not happy to open such a file.
Comment 2 Yegor Kozlov 2017-12-21 13:53:17 UTC
*** Bug 60227 has been marked as a duplicate of this bug. ***