src/ca/rmen/pdm/xls2html/main/Xls2Html.java
/**
     * Read one row in the given Excel sheet, and return a map of the column names to the cell values in this row.
     */
Read one row in the given Excel sheet, and return a map of the column names to the cell values in this row.
Read one row in the given Excel sheet and return a map of the column names to the cell values in this row .
private static Map<String, String> readRow(Sheet sheet, int rowId, List<String> columnNames) {
        Map<String, String> values = new HashMap<String, String>();
        int columnCount = sheet.getColumns();
        Cell[] row = sheet.getRow(rowId);
        for (int c = 0; c < columnCount && c < row.length; c++) {
            String columnName = columnNames.get(c);
            if (columnName.startsWith("#"))
                continue;
            String cellData = row[c].getContents();
            cellData = clean(cellData);
            values.put(columnName.toUpperCase(Locale.US), cellData);
        }
        return values;
    }
private static Map < String , String > readRow ( Sheet sheet , int rowId , List < String > columnNames ) { Map < String , String > values = new HashMap < String , String > ( ) ; int columnCount = sheet . getColumns ( ) ; Cell [ ] row = sheet . getRow ( rowId ) ; for ( int c = 0 ; c < columnCount && c < row . length ; c ++ ) { String columnName = columnNames . get ( c ) ; if ( columnName . startsWith ( "#" ) ) continue ; String cellData = row [ c ] . getContents ( ) ; cellData = clean ( cellData ) ; values . put ( columnName . toUpperCase ( Locale . US ) , cellData ) ; } return values ; }
Read one row in the given Excel sheet, and return a map of the column names to the cell values in this row.
Read one row in the given Excel sheet and return a map of the column names to the cell values in this row .