It all works now data, doc and table

The code opens the spreadsheet and then pulls the data using getDataRange as two lines. The single line fails for some reason. The table has been reworked. Simple, but it works!