1

I am unable to read in an image in a Google Sheet cell despite using the Sheets API v4, as mentioned in this question. The value I get is simply a null string, "". However, I am able to retrieve all text data in other cells.

Any advice is much appreciated.

I adapted the example Python Quickstart with the necessary changes such as using my spreadsheetId, sheet name, and the appropriate range.

spreadsheetId = 'XXXXX'
rangeName = 'Sheet1!A1:C1'
result = service.spreadsheets().values().get(
    spreadsheetId=spreadsheetId, range=rangeName).execute()
values = result.get('values', [])

Looking into values, I get the text in A1 and C1. B1, in the Google Sheet UI, contains "=image('https://.......')". But when I look at the corresponding index in values, I see only a null string.

tehhowch
  • 9,645
  • 4
  • 24
  • 42
tktang
  • 11
  • 3
  • Hi and welcome on Stack Overflow. Please provide a minimal, complete and verifiable example. http://stackoverflow.com/help/mcve – Jacques Gaudin Mar 10 '17 at 10:04
  • Hi Jacques, Thanks for your reply. Edited with more information. Hopefully, good enough. – tktang Mar 10 '17 at 22:24
  • Note that you are using `spreadsheet.values.get` and the referenced question uses `spreadsheets.get`, which allows retrieving the **formula**s. – tehhowch Mar 14 '19 at 15:30

0 Answers0