Reduced complexity of a method

the populateSheetTable method now correctly loops over the result set.
Previously there were issues with the result set being 1 indexed and the
rows 0 indexed