2

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

1 Answers1

0

You request is based on the Google Feed API, which has been deprecated

Hence, your error message. You need to find a workaround, see also here.

Specificly for Google Sheets: Currently you can call the feeds URL as done here, but mind that this will also get deprecated soon.

Currently working alternatives are using the Sheets API v4 or the Google Visualization API.

ziganotschka
  • 25,866
  • 2
  • 16
  • 33