As the application looks like Excel, I have to check whether the div have horizontal or Vertical Scrollbar present to set the size of other Div.
JQuery Code is as folows:
if($('div.dataTableDiv').width()<$('#dataTable').width())
console.log('Horizontal Scrollbar Present');
else
console.log('Horizontal Scrollbar NOT Present');
For Vertical Scrollbar:
if($('div.dataTableDiv').height()<$('#dataTable').height())
console.log('Vertical Scrollbar Present');
else
console.log('Vertical Scrollbar NOT Present');