StartsWithPatternInputFormatExcel Class

StartsWithPatternInputFormatExcel is used to parse a Microsoft Excel file in which the beginning of each record is marked by a specific pattern defined using a regular expression.

Configuration

The configuration names consist of the following parameters:

Example

Given the content of an Excel spreadsheet as shown below, records can be extracted based on a pattern.



To read records from the Excel spreadsheet, use the following configuration:

Configuration NameConfiguration Value
hgrid247.excel.sheet2processall
hgrid247.record.startPattern^\\d+,


Output Result

The Excel file is parsed into the following records:
Record 1 :
1,name,MS Dhoni
,role,Captain
,position,Wicket-Keeper
,salary,9

Record 2 :
2,name,Shikhar Dhawan
,role,Batsman
,position,Point
,salary,10

Record 3 :
3,name,Virat Kohli
,role,Batsman
,position,cover
,salary,10

Record 4 :
4,name,Shami
,role,Bowler
,position,SquareLeg
,salary,12

Record 5 :
5,name,Zaheer Khan
,role,Bowler
,position,FineLeg
,salary,11

Behavior

Typical Use Cases