public class ExcelReader extends Object
Modifier and Type | Field and Description |
---|---|
static int |
noOfSheet |
Constructor and Description |
---|
ExcelReader() |
ExcelReader(File file)
Creates a ExcelReader object based on
File object passed |
ExcelReader(File file,
int sheetNo) |
ExcelReader(File file,
String sheetName) |
ExcelReader(String filePath)
Creates a ExcelReader object based on filePath
|
ExcelReader(String filePath,
int sheetNo) |
ExcelReader(String filePath,
String sheetName) |
Modifier and Type | Method and Description |
---|---|
String |
getData(int row,
int column)
Gets the data from the currently opened sheet based on row and column number
|
int |
getNoOfColumn()
Gets the no.
|
int |
getNoOfColumn(int rowNo)
Gets the no.
|
int |
getNoOfRows()
Gets the no.
|
org.apache.poi.ss.usermodel.Workbook |
getOpenWorkbook() |
Map<String,List<String>> |
getStoredData() |
void |
openFile(File file,
int sheetNo) |
void |
openFile(File file,
String sheetName) |
void |
openFile(String filePath,
int sheetNo) |
void |
openFile(String filePath,
String sheetName) |
void |
openSheet(int sheetNo) |
void |
openSheet(String sheetName) |
void |
storeData()
Stores the whole data of the currently opened sheet in a Map containing keys
|
public ExcelReader(String filePath) throws FileNotFoundException, IOException
filePath
- File path of the file to be openedFileNotFoundException
IOException
public ExcelReader(File file) throws IOException, FileNotFoundException
File
object passedfile
- File
object of the file to be opened.IOException
FileNotFoundException
public ExcelReader(String filePath, int sheetNo) throws IOException, FileNotFoundException
filePath
- sheetNo
- IOException
FileNotFoundException
public ExcelReader(String filePath, String sheetName) throws IOException, FileNotFoundException
filePath
- sheetName
- IOException
FileNotFoundException
public ExcelReader(File file, int sheetNo) throws IOException, FileNotFoundException
file
- sheetNo
- IOException
FileNotFoundException
public ExcelReader(File file, String sheetName) throws IOException, FileNotFoundException
file
- sheetName
- IOException
FileNotFoundException
public ExcelReader()
public void openFile(File file, int sheetNo) throws IOException, FileNotFoundException
file
- sheetNo
- IOException
FileNotFoundException
public void openFile(String filePath, int sheetNo) throws FileNotFoundException, IOException
filePath
- sheetNo
- FileNotFoundException
IOException
public void openFile(File file, String sheetName) throws FileNotFoundException, IOException
FileNotFoundException
IOException
public void openFile(String filePath, String sheetName) throws FileNotFoundException, IOException
FileNotFoundException
IOException
public void openSheet(int sheetNo)
public void openSheet(String sheetName)
public org.apache.poi.ss.usermodel.Workbook getOpenWorkbook()
public String getData(int row, int column)
row
- Row no. from which the value has to be fetchedcolumn
- Respective column no. in the row from which the value has to be fetchedpublic int getNoOfRows()
public int getNoOfColumn()
public int getNoOfColumn(int rowNo)
rowNo
- Row no. for which the no. of column have to evaluated.public void storeData()
Copyright © 2014. All rights reserved.