packages/opal-node-msexcel/msexcel.js
function writeCols(ws, cols, contents) {
        let range = ws['!ref'];
        range = check.undefined(range) ? 'A1:A1' : range;
        let dRange = xlsx.utils.decode_range(range);
        let newRef = {s: {c: 0, r: 0}, e: {c: dRange.e.c, r: dRange.e.r}};
        let encCell;
        if (typeof cols === 'string') {
            cols = cols.split(',');
        }
        for (let i = 0; i < cols.length; ++i) {
            let dCol = xlsx.utils.decode_col(cols[i]);
            let cellVal = contents[i];
            if (dCol > newRef.e.c) {
                newRef.e.c = dCol;
            }


            for (let R = dRange.s.r; R < cellVal.length; ++R) {
                encCell = xlsx.utils.encode_cell({c: dCol, r: R});
                if (R > newRef.e.r) {
                    newRef.e.r = R;
                }

                ws[encCell] = updateCellData(ws[encCell], cellVal[R]);
            }
        }
        ws['!ref'] = xlsx.utils.encode_range(newRef);
        return ws;
    }
function writeCols(ws, cols, contents) {
        let range = ws['!ref'];
        range = check.undefined(range) ? 'A1:A1' : range;
        let dRange = xlsx.utils.decode_range(range);
        let newRef = {s: {c: 0, r: 0}, e: {c: dRange.e.c, r: dRange.e.r}};
        let encCell;
        if (typeof cols === 'string') {
            cols = cols.split(',');
        }
        for (let i = 0; i < cols.length; ++i) {
            let dCol = xlsx.utils.decode_col(cols[i]);
            let cellVal = contents[i];
            if (dCol > newRef.e.c) {
                newRef.e.c = dCol;
            }


            for (let R = dRange.s.r; R < cellVal.length; ++R) {
                encCell = xlsx.utils.encode_cell({c: dCol, r: R});
                if (R > newRef.e.r) {
                    newRef.e.r = R;
                }

                ws[encCell] = updateCellData(ws[encCell], cellVal[R]);
            }
        }
        ws['!ref'] = xlsx.utils.encode_range(newRef);
        return ws;
    }
function writeCols ( ws , cols , contents ) { let range = ws [ '!ref' ] ; range = check . undefined ( range ) ? 'A1:A1' : range ; let dRange = xlsx . utils . decode_range ( range ) ; let newRef = { s : { c : 0 , r : 0 } , e : { c : dRange . e . c , r : dRange . e . r } } ; let encCell ; if ( typeof cols === 'string' ) { cols = cols . split ( ',' ) ; } for ( let i = 0 ; i < cols . length ; ++ i ) { let dCol = xlsx . utils . decode_col ( cols [ i ] ) ; let cellVal = contents [ i ] ; if ( dCol > newRef . e . c ) { newRef . e . c = dCol ; } for ( let R = dRange . s . r ; R < cellVal . length ; ++ R ) { encCell = xlsx . utils . encode_cell ( { c : dCol , r : R } ) ; if ( R > newRef . e . r ) { newRef . e . r = R ; } ws [ encCell ] = updateCellData ( ws [ encCell ] , cellVal [ R ] ) ; } } ws [ '!ref' ] = xlsx . utils . encode_range ( newRef ) ; return ws ; }
writes specified cols to an opened workbook
@function
@param {object} ws - worksheet.
@param {object} cols - cols where contents are written
@param {boolean} contents - contents that are to written to specified cols
@return {object} ws - returns the modified worksheet
writes specified cols to an opened workbook