I am trying to get some data from a Google Spreadsheet but something it's not working and I get the error
TypeError: Cannot read property 'feed' of null
This is what I have tried.
var GoogleSpreadsheetsParser = require('google-spreadsheets-parser');
var publishedUrl = myPublishURL;
var gss = new GoogleSpreadsheetsParser(publishedUrl,
{sheetTitle: 'Sample', hasTitle: true});
console.log(gss.titles);
Obviously it's not a code error, but I can't find a way to solve it. Does anyone know how to solve this problem? And yes, the document is public and yes, myPublishURL is the URL