Class ExcelAssistant

java.lang.Object
microsim.data.excel.ExcelAssistant

public class ExcelAssistant extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    loadCoefficientMap(String excelFileName, String sheetName, int keyColumns)
    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).
    loadCoefficientMap(String excelFileName, 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).
    loadCoefficientMap(String excelFileName, 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
    static int
    loadCoefficientMapTest(String excelFileName, String sheetName, int keyColumns, int valueColumns)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExcelAssistant

      public ExcelAssistant()
  • Method Details

    • loadCoefficientMap

      public static MultiKeyCoefficientMap loadCoefficientMap(String excelFileName, String sheetName, int keyColumns)
      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 data
      sheetName - : the Excel worksheet name that stores the data
      keyColumns - : 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 returned
      Returns:
    • loadCoefficientMapTest

      public static int loadCoefficientMapTest(String excelFileName, String sheetName, int keyColumns, int valueColumns)
    • loadCoefficientMap

      public static MultiKeyCoefficientMap loadCoefficientMap(String excelFileName, 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 data
      sheetName - : the Excel worksheet name that stores the data
      keyColumns - : 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 returned
      valueColumns - : 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(String excelFileName, 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 data
      sheetName - : the Excel worksheet name that stores the data
      keyColumns - : 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 returned
      valueColumns - : 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
      startLine - : 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: