Convert to range

Refer to the following example code to see how to convert table to range.