
ChatGPT nateableプラグインで「ノーコードで」googleスプレッドシートを読み書き出来た
ChatGPT の nateableプラグインを使うとChatGPTからプロンプトでPythonが実行できる。
こういうのが簡単にできます。

実際は以下のコードをChatGPTが書いてnotebookで実行した結果を表示しています。
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(0, 2*np.pi, 100)
y_sin = np.sin(x)
y_cos = np.cos(x)
plt.figure(figsize=(8, 6))
plt.plot(x, y_sin, label='sin')
plt.plot(x, y_cos, label='cos')
plt.legend()
plt.title('Sin and Cos from 0 to 2π')
plt.xlabel('x')
plt.ylabel('y')
plt.grid(True)
plt.show()

こうなると「入出力」が欲しくなります。noteableプラグインからgoogle sheetが読み書き出来ないか試してみました。
上記を参考にローカルPCでgoogle sheetに書き込むPythonプログラムを作って動くことを確認しました。
それをchatGPTで
Q.以下のファイルを参考にgsheet_sample ノートブックでgoogle sheet のセル 3,3に "test value3"と書きこんで下さい
<pythonのコード>
とやったところうまく書きこめました。



読み出しもうまくいきました。
Q.セル 2,2の値が読み込めますか
A.Googleスプレッドシートのセル(2,2)の値を読み込むコードを実行しました。そのセルの値は "test" です。
