Bug 54673

Summary: [PATCH] Simple wildcard support in HLOOKUP, VOOLKUP, MATCH, COUNTIF
Product: POI Reporter: opensource
Component: POI OverallAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: P2    
Version: 3.10-dev   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: diff files generated using ant patchpackage task + excel LookupFunctionsTestCaseData.xls
added testcases for complex wildcard values support
xls used by testcases to be copied into test-data\spreadsheet

Description opensource 2013-03-12 10:30:54 UTC
Created attachment 30041 [details]
diff files generated using ant patchpackage task + excel LookupFunctionsTestCaseData.xls

Support now wilcards 
? (question mark) Any single character
    For example, sm?th finds "smith" and "smyth"
* (asterisk) Any number of characters
    For example, *east finds "Northeast" and "Southeast"
~ (tilde) followed by ?, *, or ~A question mark, asterisk, or tilde
    For example, fy91~? finds "fy91?"

Combinations are supported and were extensively tested 
 
Testcases extended
* LookupFunctionsTestCaseData.xls
* org.apache.poi.ss.formula.functions.TestCountFuncs
* org.apache.poi.ss.formula.functions.TestMatch
Comment 1 opensource 2013-03-13 13:53:13 UTC
I've added more than 150 new unitary tests in LookupFunctionsTestCaseData.xls) show that complex wildcards are also supported by the core of apache poi and this patch!

new LookupFunctionsTestCaseData.xls will be uploaded here later
Comment 2 opensource 2013-03-14 10:35:42 UTC
added files
+ org.apache.poi.ss.formula.functions.TestFunctionsFromSpreadsheet
+ org.apache.poi.ss.formula.functions.TestMatchFunctionsFromSpreadsheet
+ MatchFunctionTestCaseData.xls



Limitations
Current patch has some limitations: Match don't support wilcards values with Match type
* 1 Largest value
* -1 Smallest value
for both simple and complex wildcard, testcases in MatchFunctionTestCaseData.xls are defined but skipped using <skip>

Use patch.tar.gz + spreadsheet.zip
Comment 3 opensource 2013-03-14 10:36:52 UTC
Created attachment 30048 [details]
added testcases for complex wildcard values support
Comment 4 opensource 2013-03-14 10:37:37 UTC
Created attachment 30049 [details]
xls used by testcases to be copied into test-data\spreadsheet
Comment 5 Nick Burch 2014-07-26 15:46:43 UTC
Looks like this was actually committed last year, shortly after being contributed:

r1457243 | yegor | 2013-03-16 12:33:08 +0000 (Sat, 16 Mar 2013) | 1 line
Bug 54673 - [PATCH] Simple wildcard support in HLOOKUP, VOOLKUP, MATCH, COUNTIF

As such, closing this bug now