Handsontable test1

by rough cheap

HTML

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/handsontable.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/handsontable.full.min.css">
<div id="example"></div>

JavaScript

var example = document.getElementById("example");
var data = {};
var hot = new Handsontable(example, {
  data: data,
  colHeaders: ['メーカー', '商品名', '型番', '数量', '単価', '合計'],
  colWidths: [60,200,200,60,80,80],
  columns: [{
    data: 'maker',
    type: 'text',
    readOnly: false
  }, {
    data: 'item',
    type: 'text',
    readOnly: false
  }, {
    data: 'model',
    type: 'text',
    readOnly: false
  }, {
    data: 'count',
    type: 'numeric',
    readOnly: false
  }, {
    data: 'price',
    type: 'numeric',
    readOnly: false
  }, {
    data: 'total',
    type: 'numeric',
    readOnly: false
  }],
  minSpareRows: 10,
  width: '100%',
  height: 300,
  manualColumnResize: true,
  manualRowResize: false
});