The use of getCellRange() with named range return the cellRange even if it is not located into the referred worksheet.
Follow the steps to reproduce :
- Create a workbook with two worksheet ;
- Select a range of cells into the second worksheet and give it a name (ex. : "testRange") ;
- Try to get the cell range from the first worksheet (ws1.getCellRange("testRange"'))
=> The return of the getCellRange from the first worksheet call return a value of cellRange from the second worksheet. It should not.