皆様いつもお世話になっております。
=IMAGE( をgspreadでスプレッドシートに書き込みたいのですが、これで.append_row()すると、'=IMAGE と何故か文字の先頭にシングルクオートが書き込まれてしまいます。
どうしたらシングルクオートが書かれないようになるでしょうか?
Python
1import gspread 2from oauth2client.service_account import ServiceAccountCredentials 3 4scope = ['https://spreadsheets.google.com/feeds', 5 'https://www.googleapis.com/auth/drive'] 6 7credentials = ServiceAccountCredentials.from_json_keyfile_name('JSON名.json', scope) 8gc = gspread.authorize(credentials) 9worksheet = gc.open('スプレッドシートの名前').worksheet('画像管理') 10 11values_list = worksheet.get_all_values() 12if values_list[-1] is not None: 13 print('There are somethings') 14 worksheet.append_row(["画像", 15 "=IMAGE(" + "\"https://d1f5hsy4d47upe.cloudfront.net/2b/2bb06df99bd611e2c2ff8b572f6372c2_w.jpg\"" + ", 4,240,360)"]) 16 print() 17else: 18 print('There are nothing')
アドバイスとご教授のほどよろしくお願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/07/10 01:27