setValue = function(cell, value, force) {
    const obj = this;

    const records = [];

    if (typeof(cell) == 'string') {
        const columnId = getIdFromColumnName(cell, true);
        const x = columnId[0];
        const y = columnId[1];

        // Update cell
        records.push(updateCell.call(obj, x, y, value, force));

        // Update all formulas in the chain
        updateFormulaChain.call(obj, x, y, records);
    } else {
        let x = null;
        let y = null;
        if (cell && cell.getAttribute) {
            x = cell.getAttribute('data-x');
            y = cell.getAttribute('data-y');
        }

        // Update cell
        if (x != null && y != null) {
            records.push(updateCell.call(obj, x, y, value, force));

            // Update all formulas in the chain
            updateFormulaChain.call(obj, x, y, records);
        } else {
            const keys = Object.keys(cell);
            if (keys.length > 0) {
                for (let i = 0; i < keys.length; i++) {
                    let x, y;

                    if (typeof(cell[i]) == 'string') {
                        const columnId = getIdFromColumnName(cell[i], true);
                        x = columnId[0];
                        y = columnId[1];
                    } else {
                        if (cell[i].x != null && cell[i].y != null) {
                            x = cell[i].x;
                            y = cell[i].y;
                            // Flexible setup
                            if (cell[i].value != null) {
                                value = cell[i].value;
                            }
                        } else {
                            x = cell[i].getAttribute('data-x');
                            y = cell[i].getAttribute('data-y');
                        }
                    }

                     // Update cell
                    if (x != null && y != null) {
                        records.push(updateCell.call(obj, x, y, value, force));

                        // Update all formulas in the chain
                        updateFormulaChain.call(obj, x, y, records);
                    }
                }
            }
        }
    }

    // Update history
    setHistory.call(obj, {
        action:'setValue',
        records:records,
        selection:obj.selectedCell,
    });

    // Update table with custom configurations if applicable
    updateTable.call(obj);

    // On after changes
    const onafterchangesRecords = records.map(function(record) {
        return {
            x: record.x,
            y: record.y,
            value: record.newValue,
            oldValue: record.oldValue,
        };
    });

    dispatch.call(obj, 'onafterchanges', obj, onafterchangesRecords);
}
Set a cell value

@param mixed cell destination cell
@param string value value
@return void