<style>
table{
border-collapse: collapse;
}
td{
border: 1px solid gray;
}
</style>
<table id="tab">
<tr><td>34,5</td><td>3,5</td><td>36</td><td>23</td></tr>
<tr><td>34,5</td><td>3,5</td><td>36</td><td>23</td></tr>
<tr><td>34,5</td><td>3,5</td><td>36</td><td>23</td></tr>
</table>
<script>
tab.onmouseup = e => {
var tds = document.querySelectorAll('#tab td');
var start = getSelection().anchorNode.parentNode;
stop = getSelection().focusNode;
stop = stop.tagName == 'TD'? stop:stop.parentNode;
if([].indexOf.call(tds, start)>[].indexOf.call(tds, stop)) [start,stop] = [stop,start];
if(stop.parentNode != start.parentNode) {
console.error('МИМО! Можно выделять только одну строку!');
return;
}
var arr = [start.textContent];
while(stop !=start) {
start = start.nextElementSibling;
arr.push(stop.textContent);
}
console.log(arr);
};
</script>