I am working with a sheet that has both numeric and text-values. What I would like to do, is to remove all the rows with text values and only keep the rows with numeric values. In this image, Column A represents what I currently have, Column B what I want to achieve. I have an example code that can be used to remove single values, but how could I make this work to apply for all the characters, not just specific words?
function deleteEmptyRows(){
var sh = SpreadsheetApp.getActiveSheet();
var data = sh.getDataRange().getValues();
var targetData = new Array();
for(n=0;n<data.length;++n){
if(data[n].join().replace(/,/g,'')!=''){ targetData.push(data[n])};
Logger.log(data[n].join().replace(/,/g,''))
}
sh.getDataRange().clear();
sh.getRange(1,1,targetData.length,targetData[0].length).setValues(targetData);
}
Also, it doesn't need to be this solution that does the work. I am looking for the best solution. This is just an example I found.

