This is the same thing that the previous answer is saying, but I thought it might help to show a line of code.
If you have a scanner, cleverly named 'scanner', you can use the setRange() method to set the range on the scanner. Because the default range is (-inf, +inf), passing setRange a newly created range object will give your scanner, with a range of (-inf, +inf), the ability to scan the entire table.
The sample code looks like:
scanner.setRange(new Range());