Package microsim.data.excel
Class ExcelAssistant
- java.lang.Object
-
- microsim.data.excel.ExcelAssistant
-
public class ExcelAssistant extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ExcelAssistant()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MultiKeyCoefficientMap
loadCoefficientMap(java.lang.String excelFileName, java.lang.String sheetName, int keyColumns, int valueColumns)
Load MultiKeyCoefficientMap from Excel spreadsheet data, reading from the first line of the spreadsheet, and automatically finds the last line of the spreadsheet (blank lines within the data are not allowed and will result in a NullPointerException).static MultiKeyCoefficientMap
loadCoefficientMap(java.lang.String excelFileName, java.lang.String sheetName, int keyColumns, int valueColumns, int startLine, int endLine)
Load MultiKeyCoefficientMap from Excel spreadsheet data, choosing which line to start reading from via the startLine parameter
-
-
-
Method Detail
-
loadCoefficientMap
public static MultiKeyCoefficientMap loadCoefficientMap(java.lang.String excelFileName, java.lang.String sheetName, int keyColumns, int valueColumns)
Load MultiKeyCoefficientMap from Excel spreadsheet data, reading from the first line of the spreadsheet, and automatically finds the last line of the spreadsheet (blank lines within the data are not allowed and will result in a NullPointerException).- Parameters:
excelFileName
- : the Excel workbook (.xls or .xlsx) that stores the datasheetName
- : the Excel worksheet name that stores the datakeyColumns
- : the number of columns (stored to the left of the worksheet) that represent keys. This will equal the number of keys of the MultiKeyCoefficientMap that is returnedvalueColumns
- : the number of columns (stored to the right of the keys in the worksheet) that represents values, not keys. This will equal the size of the values[] array for each MultiKey in the MultiKeyCoefficientMap- Returns:
-
loadCoefficientMap
public static MultiKeyCoefficientMap loadCoefficientMap(java.lang.String excelFileName, java.lang.String sheetName, int keyColumns, int valueColumns, int startLine, int endLine)
Load MultiKeyCoefficientMap from Excel spreadsheet data, choosing which line to start reading from via the startLine parameter- Parameters:
excelFileName
- : the Excel workbook (.xls or .xlsx) that stores the datasheetName
- : the Excel worksheet name that stores the datakeyColumns
- : the number of columns (stored to the left of the worksheet) that represent keys. This will equal the number of keys of the MultiKeyCoefficientMap that is returnedvalueColumns
- : the number of columns (stored to the right of the keys in the worksheet) that represents values, not keys. This will equal the size of the values[] array for each MultiKey in the MultiKeyCoefficientMapstartLine
- : Parameter specifying the (physical, not logical) Excel row number at which to start reading (1 is the first line)endLine
- : Parameter specifying the (physical, not logical) Excel row number at which to finish reading (1 is the first line)- Returns:
-
-