As told by someone here: https://stackoverflow.com/a/65258767/17862862
in this answer, A1 notation dosent seem to work for specified range : var poData = poTab.getDataRange('Incoming Sample!A1:B10').getValues();
But the a1 notation is causing error, without this the code is working fine and importing the whole sheet, which i dont want.