com.jstatcom.io
Class ExcelHelper
- java.lang.Object
-
- com.jstatcom.io.ExcelHelper
-
public final class ExcelHelper extends java.lang.ObjectHelper methods for dealing with Excel files.
-
-
Constructor Summary
Constructors Constructor and Description ExcelHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static double[][]extractNumberArray(jxl.Workbook w, int sheetIndex, boolean firstAsDateCol, java.util.List<java.lang.Object> firstColList, java.util.List<java.lang.String> labelsList)Extracts a double array from an excel sheet.
-
-
-
Method Detail
-
extractNumberArray
public static double[][] extractNumberArray(jxl.Workbook w, int sheetIndex, boolean firstAsDateCol, java.util.List<java.lang.Object> firstColList, java.util.List<java.lang.String> labelsList)Extracts a double array from an excel sheet. It first checks the highest and lowest row indices with numbers and then extracts all cell data in between to a number array. All non numbers within are coded NaN.- Parameters:
w- the workbooksheetIndex- index of the sheetfirstAsDateCol- whether first column should be skipped, often it contains date codingfirstColList- list that is filled with elements (usually dates) from the first column iffirstAsDateCol == true, ifnullthen it is ignoredlabelsList- list that is filled with labels for each column, the firstCellType.LABELvalue in each column is used; iffirstAsDateCol == truethen the first column is skipped, ifnullthen it is ignored- Returns:
- double array with data
- Throws:
java.lang.IllegalArgumentException- if null argument or invalidsheetIndex
-
-
DMelt 3.0 © DataMelt by jWork.ORG