Bug 59881 - [PATCH] Fix for blank cells in headers in DB in D* functions
Summary: [PATCH] Fix for blank cells in headers in DB in D* functions
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: SS Common (show other bugs)
Version: 3.15-dev
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2016-07-18 15:41 UTC by Patrick Böker
Modified: 2016-07-19 08:09 UTC (History)
0 users



Attachments
dstar_empty_header_fix.patch (1.63 KB, patch)
2016-07-18 15:41 UTC, Patrick Böker
Details | Diff
DGet.xls (50.50 KB, application/octet-stream)
2016-07-18 15:43 UTC, Patrick Böker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Böker 2016-07-18 15:41:47 UTC
Created attachment 34052 [details]
dstar_empty_header_fix.patch

The D* functions errored out when the database headers contained blank cells. Excel 2013/Win7 doesn't (I didn't try with other Excel versions).
This patch fixes that.
Test included.
Comment 1 Patrick Böker 2016-07-18 15:43:46 UTC
Created attachment 34053 [details]
DGet.xls

Updated test xls file.
Comment 2 Javen O'Neal 2016-07-18 18:23:26 UTC
(In reply to Patrick Zimmermann from comment #0)
> Test included.

Could you re-upload your patch? I did not see a unit test for this.
Comment 3 Patrick Böker 2016-07-19 07:15:28 UTC
The respective test is in the DGet.xls file. That file should replace test-data/spreadsheet/DGet.xls
Comment 4 Javen O'Neal 2016-07-19 08:04:38 UTC
I see the added test in DGet.xls now

Row 102:
> empty cells
>     =DGET(G103:I104,"Three",K103:L104)
>     don't fail with empty cells in DB headers

Applied in r1753346. Thanks for the patch! This will be included in POI 3.15 beta3.
Comment 5 Javen O'Neal 2016-07-19 08:09:36 UTC
(In reply to Patrick Zimmermann from comment #0)
> Excel 2013/Win7 doesn't [error out] (I didn't try with other Excel versions).

Formula evaluation does not error out in LibreOffice 5.0.3.2, either.