org.springframework.batch.item.excel.support.rowset
Class StaticColumnNameExtractor
java.lang.Object
org.springframework.batch.item.excel.support.rowset.StaticColumnNameExtractor
- All Implemented Interfaces:
- ColumnNameExtractor
public class StaticColumnNameExtractor
- extends Object
- implements ColumnNameExtractor
ColumnNameExtractor implementation which returns a preset String[] to use as
the column names. Useful for those situations in which an Excel file without a header row
is read
- Since:
- 0.5.0
- Author:
- Marten Deinum
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StaticColumnNameExtractor
public StaticColumnNameExtractor(String[] columnNames)
getColumnNames
public String[] getColumnNames(Sheet sheet)
- Description copied from interface:
ColumnNameExtractor
- Retrieves the names of the columns in the given Sheet.
- Specified by:
getColumnNames in interface ColumnNameExtractor
- Parameters:
sheet - the sheet
- Returns:
- the column names
Copyright © 2017. All rights reserved.