having range selection in cell level like Excel
In your html
<link rel="stylesheet" type="text/css" href="toRangeSelectionTable.css">
<script src="./toRangeSelectionTable.js"></script>
In your js
toRangeSelectionTable(document.getElementById("table-id"));